>Are you using CodeFirst? In that case just declare the date as SmallDateTime. In the entity designer there's a dropdown to pick type and the SqlDbTypes should all be there I believe (it's been a long time since I used the designer though so not sure what that looks like today).
>
I am using CodeFirst and I am not using EF designers. I have all my classes defined in code.
Here is what I have
[DataType(DataType.DateTime)]
[DisplayName("Created on")]
[Column("enteredon", TypeName = "smalldatetime")]
public DateTime EnteredOn { get; set; }
[DataType(DataType.DateTime)]
[DisplayName("Modified on")]
[Column("modifiedon", TypeName = "smalldatetime")]
public DateTime? ModifiedOn { get; set; }
If it's not broken, fix it until it is.
My Blog