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 :)

Community
  • 1
  • 1
user2067567
  • 3,695
  • 15
  • 49
  • 77

1 Answers1

0

I would suggest following 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-application

You work with a generic repository, so you can use it to acces all of your tables inside your database with a single class. Just follow the tutorial, it is pretty straight forward.

Eli
  • 85
  • 6