.net - Could not Update data using asp mvc Entity-Framework -
as beginner asp .net mvc m trying update database using entity framework id null make modelstate non valide code of controller
your id equal null because model binder doesn't find value posted data.
to solve must add id hidden field view. in edit.cshtml add following line :
@html.hiddenfor(model => model.id) 
Comments
Post a Comment