I am using POCOs (no proxies) with EF4.
In the database, I have this nullable decimal column:
<Property Name="AMOUNT" Type="decimal" Precision="12" Scale="2" />
On my POCO, I have this non-nullable value property:
public decimal Amount { get; set; }
If the value in the database is null, I want the property to be set to 0. How can I achieve this? I would prefer not to have a Nullable property here, otherwise I have to pollute my business logic with GetValueOrDefault() code.
[This question seemed like what I was asking, but I'm not sure it was really answered.]
 
     
     
    