I have got a field with data type int?
price and allow null, when I set
book.price = null;
and update, it is not saved and does not throw any exceptions, when I change value # null, it is ok. I want set it null, plz help.
I have got a field with data type int?
price and allow null, when I set
book.price = null;
and update, it is not saved and does not throw any exceptions, when I change value # null, it is ok. I want set it null, plz help.
Hi,
Make sure the field is nullable in the database and is reflected so in the dbml. Regenerate the dbml for the table just to be sure. (Drop tabel from dbml and add again)
All I can say is it works for us so this is very strange.
Kind regards,
I am not suer I understand the question, this part is unclear: "when I change value # null, it is ok"
Did you make sure to call
db.SaveChanges();
(where [db] is the name of your Entites object) It is a simple mistake that I make often :P