ColumnAttribute.Expression Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets whether a column is a computed column in a database.
Assembly: System.Data.Linq (in System.Data.Linq.dll)
Use this property when you use CreateDatabase to define a column as containing computed values.
For example, if you want to create a column defined in SQL as InventoryVal AS UnitPrice * UnitsInStock, use the following expression string: "UnitPrice * UnitsInStock".
Note: |
|---|
LINQ to SQL does not support computed columns as primary keys. |
| Topic | Location |
|---|---|
| How to: Represent Computed Columns (LINQ to SQL) | |
| How to: Represent Computed Columns (LINQ to SQL) | LINQ to SQL |
Note: