Wednesday, 15 August 2012

c# - db.SaveChange(); Exception - value connot be null -



c# - db.SaveChange(); Exception - value connot be null -

in wpf application want save info databese.

db.pytanias.add(pyt); //all parameters in pyt has value db.savechanges();

when saving database exception:

system.argumentnullexception unhandled hresult=-2147467261 message=wartość nie może być zerowa. //value connot null nazwa parametru: source source=system.core paramname=source

it's sec project, in first project have exacly same , working, lost it. made sec same project i exception.

if 100% sure properties maps non-nullable columns populated; seems related navigation properties.

if pyt object has navigation properties, check populated properly.

c# savechanges

No comments:

Post a Comment