1

I was searching for a better approach when a updating the DB using Entity FrameWork 5.

Similar to this post Better way to update a record using Entity Framework

If i have more number of columns then this is not better?

Apart from Auto mapper is there any other updates now?

I was going through other post which implemented the below approach

context.Entry(original).CurrentValues.SetValues(updated)

Is this the better one ?

Any New ideas are most welcome. May be I am outdated :)

4

1 回答 1

0

我建议遵循 URi:http ://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in- an-asp-net-mvc-应用程序

您使用通用存储库,因此您可以使用它通过单个类访问数据库中的所有表。只需按照教程进行操作,它非常简单。

于 2013-08-09T09:40:20.793 回答