asp.net mvc - MVC updating deletes data -


i have added 2 fields(a, b) table. have these fields populated when new registration. however, when update form without fields included, seems erase values in fields (a, b). there way set validations in controller or model prevent them being updated, when not passing values update it?

entity framework updates fields have changed. ef sees null value change if field has data.

you should instead retrieving record, updating fields want change, re-saving.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -