Yes, you can change that. However, this is not trivial in the current version of the Entity Framework. It will become easier in the future.
The reason you see this behavior is due to the default code generation for the entity model. Here is an example:
public global::System.Guid Id
{
get
{
return this._Id;
}
set
{
this.OnIdChanging(value);
this.ReportPropertyChanging("Id");
this._Id = global::System.Data.Objects.DataClasses
.StructuralObject.SetValidValue(value);
this.ReportPropertyChanged("Id");
this.OnIdChanged();
}
}
private global::System.Guid _Id;
partial void OnIdChanging(global::System.Guid value);
partial void OnIdChanged();
, Entity Framework , . , , , . , , , .
, . , , . , . .
T4, , Entity Framework. . , Entity Framework T4 , , , .
- , IPOCO. , , Entity Framework . . .
- Entity Framework , , , . Entity Framework T4 , .