c# - This property cannot be set to a null value error .NET 4.0 -


i'm developing website on .net 4.0 mvc4 mysql database, , getting "property cannot set null value" error.

description:

i have several tables in mysql database, , of them contain nullable properties (most of them strings). then, in .net project, have .edmx file, created using wizard, file made automatically, database had.

but while testing, got error mentioned. did little reaserch , found out problem this:

_propertyname = structuralobject.setvalidvalue(value, false);  

that line, verifies value of property not null, though 'nullable' checkbox checked on database client (heidisql in case). temporary solution found if change 'false' 'true' in line, works. looks this:

_propertyname = structuralobject.setvalidvalue(value, true); 

the problem have lots of nullable properties in different tables, need find way make entityframework understand want properties allow null value, without having search every field in designer , change manually.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -