Linq To Sql - SQL Default Constraint Problem

后端 未结 2 604
别跟我提以往
别跟我提以往 2021-01-19 12:19

I have a USER table in database. The table has a RegistrationDate column which has a default constraint as GETDATE().

When using LINQ, I don\'t provide any data for

相关标签:
2条回答
  • 2021-01-19 13:18

    I am not 100% sure, but you could make the property read-only in the DBML designer.

    0 讨论(0)
  • 2021-01-19 13:19

    Set Auto Generated Value property to true in the designer.

    Or IsDbGenerated="true" in .dbml file.

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