How To Update EF 4 Entity In ASP.NET MVC 3?

后端 未结 6 1923
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-09 07:26

I have 2 projects - a class library containing an EDM Entity Framework model and a seperate ASP.NET MVC project.

I\'m having problems with how your suppose to edit and s

6条回答
  •  伪装坚强ぢ
    2021-02-09 07:50

    I would retrieve the user from the database and update that entity. EF can't just magically know which values are supposed to be modified and which aren't.

    If you're concerned about concurrency issues you would need to store the timestamp in the view - usually as a hidden form value.

提交回复
热议问题