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
OK, after some trial and error, I look to have found a solution. Here is my updated Update
method in the UserRepository
:
public void Update(User user)
{
using (this.Context)
{
var tempUser = new User { usr_id = user.usr_id };
this.Context.Users.Attach(tempUser);
this.Context.ApplyCurrentValues("Users", user);
this.Context.SaveChanges();
}
}
Some of other examples I tried were very close to the above, but just missed the mark.