Link to home
Start Free TrialLog in
Avatar of arthrex
arthrexFlag for Germany

asked on

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?


error.gif
Avatar of Jens Fiederer
Jens Fiederer
Flag of United States of America image

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.
ASKER CERTIFIED SOLUTION
Avatar of arthrex
arthrex
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial