default value support for Entity Framework object construction to avoid having to set this column pa
Posted
by Greg
on Stack Overflow
See other posts from Stack Overflow
or by Greg
Published on 2010-05-30T04:46:44Z
Indexed on
2010/05/30
4:52 UTC
Read the original article
Hit count: 322
Hi,
In entity framework is there a way to have a default value for a column such that Linq to Entity won't require this parameter when constructing a new object?
For example I've marked on column in the EF designer with a default value (I typed in "All" as it was a string). But if I try to construct a new record and not specify this parameter I still get a FOREIGN KEY constraint exception.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_FunctionalityTypeInterfaceRelationship"
© Stack Overflow or respective owner