I’m running a linq-to-sql query on a table that contains a nullable datetime like this:
var Output = from s in ....
select new MyModel()
{
TheCloseDate = s.TheCloseDate.DateTime.Value
}
However, the variable TheCloseDate never gets filled. The MyModel definition of the variable is :
public Nullable<DateTime> TheCloseDate { get; set; }
What am I doing wrong here?
Thanks for your suggestions.
Try