ColumnAttribute::Expression Property
.NET Framework (current version)
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. |
.NET Framework
Available since 3.5
Windows Phone Silverlight
Available since 7.1
Available since 3.5
Windows Phone Silverlight
Available since 7.1
Show:
