Reputation: 1571
Initially, for Date_IN column in my DB i set it as 'DateTime' datatype. Then due to some issues, i modified it to 'Date' datatype. But when i tried to update the model in Entity Framework by right clicking in the designer 'Update model from Database', the column datatype is not setting to 'Date' datatype.
Modified datatype for Date_IN column:
Update Model from database:
Datetype not changed:
In the properties for the column, i even could not find 'Date' datatype. Please check through the below images for further details. Please let me know how to proceed with this. Any alternatives?
Upvotes: 1
Views: 703
Reputation: 1487
There is no Date
type in C# (which is what it's showing you in the Type field). So even if you change your data type in the database from datetime
to date
it will still map to a DateTime
in your model in EF.
Upvotes: 1