LINQ Insert with default values

Hi experts,

I access my database using LINQ. On some db fields I defined default values right on the database.
Now I want linq to use those default values if no other value is defined.
I found the property "auto generated value". I thought thats the solution, but whenever I try to insert now I get an error message (see screenshot - sorry its in german)

Can anyone help me?

Who is Participating?
arthrexConnect With a Mentor Author Commented:
I googled a bit and found out that LINQ currently does not support default values.
So I did it the old fashioned way via an SQLConnection object...
Jens FiedererTest Developer/ValidatorCommented:
Normally, when a database has default values on insert, those are the values used when you do an insert with NULL values on those columns.

I think the "auto generated value" is for sequence numbers.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.