I use Entity Framework 6, database first. There are automatically generated entities like this:
public partial class PutlZeroMileage { public long ID { get; set; } public Nullable<System.DateTime> Date { get; set; } public Nullable<int> FK_ZM { get; set; } public Nullable<decimal> KmFact { get; set; } public Nullable<decimal> FctBeginTime { get; set; } public Nullable<decimal> FctEndTime { get; set; } public string ControlPointB { get; set; } public string ControlPointE { get; set; } public Nullable<bool> Consider { get; set; } public Nullable<long> FK_Putl { get; set; } public Nullable<int> Time { get; set; } public virtual Putl Putl { get; set; } public virtual ZeroMileage ZeroMileage { get; set; } } Properties are bound to columns in a datagrid. It is necessary that when you change one of the properties (for example FctBeginTime) change Time. In theory, the set FctBeginTime properties can be recalculated Time, and call PropertyChanged. But this is the generated code, the regeneration will erase everything. How to do it better?