Link to home
Start Free TrialLog in
Avatar of canuckconsulting
canuckconsultingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Specifying SmallDateTime as data type for Entity Framework Code First

Is there a way to force a DateTime model property to be created in SQL Server as a SmallDateTime?  This is in a asp.net MVC 5 project with EF 6.  The target db is SQL Server 2012.
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Not that I know of.
And why would you? Except for saving a few bytes of storage, it has no advantage of other date types.

/gustav
ASKER CERTIFIED SOLUTION
Avatar of Ioannis Paraskevopoulos
Ioannis Paraskevopoulos
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of canuckconsulting

ASKER

Giannis - Perfect!  Thanks.

gustav - I'm as stingy with bytes as I am money.  :)