Linq To Sql - SQL Default Constraint Problem

Posted by Ahmet Altun on Stack Overflow See other posts from Stack Overflow or by Ahmet Altun
Published on 2010-04-30T10:21:37Z Indexed on 2010/04/30 10:27 UTC
Read the original article Hit count: 338

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about linq-to-sql

Related posts about Constraint