Class ResizeFieldOperation
Restates a field's stored type to the one the model now declares — how a varchar(50) becomes a
varchar(200).
Distinct from ConvertFieldOperation, which changes what kind of thing is stored and has to rewrite the values. This changes only how much room it has, so the store does the work: a widening is usually free, and a narrowing is the store's to refuse if it would truncate.
public sealed class ResizeFieldOperation : MigrationOperation
- Inheritance
-
ResizeFieldOperation
- Inherited Members
Constructors
ResizeFieldOperation(Type, LambdaExpression)
Restates a field's stored type to the one the model now declares — how a varchar(50) becomes a
varchar(200).
Distinct from ConvertFieldOperation, which changes what kind of thing is stored and has to rewrite the values. This changes only how much room it has, so the store does the work: a widening is usually free, and a narrowing is the store's to refuse if it would truncate.
public ResizeFieldOperation(Type entityType, LambdaExpression field)
Parameters
entityTypeTypefieldLambdaExpression
Properties
Field
The field selector; the size comes from the model.
public LambdaExpression Field { get; }