I have a persistent class that looks like this:
public partial class Unit { public string Name { get; set; } public long LengthInMM { get; set; } public decimal VolumeCoefficient { get { return LengthInMM * LengthInMM * LengthInMM; } } }
Now the derived field (VolumeCoefficient) never gets explicitly assigned. How do I save it in ADO.NET entity framework?
I thought of subclassing the Unit class and overriding the getters and setters but that seems too messy.