Linq-to-SQL ignores SQL Server default value

后端 未结 6 1513
感情败类
感情败类 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:12

    I was faced the same problem of boolean data type with default as false and not updating that value So when i see the database table, i was found there is not primary key was set, therefore when i was set the primary key it was updated find. so check a table if it has the primary key or not.

提交回复
热议问题