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
Post a Comment