RelationalPropertyBuilderExtensions.CanSetIsStoredComputedColumn Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value indicating whether the given computed column type can be set for the column.
public static bool CanSetIsStoredComputedColumn (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, bool? stored, bool fromDataAnnotation = false);
static member CanSetIsStoredComputedColumn : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * Nullable<bool> * bool -> bool
<Extension()>
Public Function CanSetIsStoredComputedColumn (propertyBuilder As IConventionPropertyBuilder, stored As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- propertyBuilder
- IConventionPropertyBuilder
The builder for the property being configured.
If true
, the computed value is calculated on row modification and stored in the database like a regular column.
If false
, the value is computed when the value is read, and does not occupy any actual storage.
null
selects the database provider default.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the given computed column type can be set for the column.
Remarks
See Database default values for more information and examples.
Applies to
Entity Framework