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 anyone else experienced this behaviour? Is there a way to fix it, so that Linq-to-SQL or SQL Server automatically sets the default value?
The column I added was of type Bit, with a default value set to 1.
I have now definitively fixed this by using an example from this blog.
I needed to pass this into a partial datacontext class, as the default one is automatically overwritten every time you change something in the dbml.