Thursday, 12 September 2013

The null value cannot be assigned to a member with type decimal which is a non-nullable value type

The null value cannot be assigned to a member with type decimal which is a
non-nullable value type

The following code produces an error when the IQueryable is enumerated:
from record in Table
select Convert.ToDecimal(record.nullableDecimalColumn);
The error is an InvalidOperationException:
The null value cannot be assigned to a member with type decimal which is a
non-nullable value type

No comments:

Post a Comment