I have a Members
table with a column containing date of birth; by default the datatype for the dateofbirth
column is varchar
.
How can I convert the string to a DateTime
using Entity Framework?
I have tried something like this:
let dob = eclipse.members.Take(1)
.Select(x => report.member_Dob)
.Cast<DateTime>()
.FirstOrDefault()
But it does not work for me and I can't change the schema.