SQL 'time' type in Entity Framework Code First

前端 未结 1 1602
一个人的身影
一个人的身影 2020-12-14 15:14

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 { ge         


        
相关标签:
1条回答
  • 2020-12-14 16:08

    If you want to use Time type in database you will have to use TimeSpan with 24 hour cycle in your application. DateTime is not representation of time.

    0 讨论(0)
提交回复
热议问题