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 RegistrationDate column to make it default. But SQL Server raises error. I think LINQ tries to insert NULL into the column.
How can I make LINQ not to try to insert in the column RegistrationDate, because it has default value?
Set Auto Generated Value
property to true
in the designer.
Or IsDbGenerated="true"
in .dbml
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With