SQLite DATETIME column with Entity Framework

前端 未结 1 585
闹比i
闹比i 2020-12-18 07:13

I have an existing SQLite database that I want to use in Entity Framework. However SQLite\'s weird type system means you can even

create table temp(temp date         


        
相关标签:
1条回答
  • 2020-12-18 08:02

    You have to change your connection string to something like

    data source="|DataDirectory|\data.sqlite";datetimeformat=UnixEpoch;datetimekind=Utc
    

    You can change these settings in Server Explorer/<right click your connection>/Modify Connection/Advanced, but changing the settings there will not propagate to your App.config connection string.

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