SQL 'time' type in Entity Framework Code First
I'm trying to create a 'time(7)' column in a table with Entity Framework Code First. This is my Entity: public class ShiftDetail { public long Id { get; set; } [Required] public int DayOfWeek { get; set; } [Required] [Column(TypeName="time")] public DateTime StartTime { get; set; } [Required] [Column(TypeName = "time")] public DateTime EndTime { get; set; } public long ShiftId { get; set; } public virtual Shift Shift { get; set; } } As you can see I'm trying to set the database type for the columns StartTime and EndTime to "time" but I get this error: (112,12) : error 2019: Member Mapping