Linq-to-SQL ignores SQL Server default value

后端 未结 6 1534
感情败类
感情败类 2020-12-15 17:59

When using Linq-to-SQL, adding a column to an existing table, and setting a default value on that new column, it seems that Linq to SQL ignores the default value. Has anyon

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 18:16

    Go into the designer and select "Auto-Sync" value of "OnInsert". This will sync the value when the record is inserted into the database.

提交回复
热议问题