How do I update an existing entity using AttachCopy method? Is it possible to do it that way?
I know I can use the regular update feature, but I'm trying to safe time and effort because some of my entity objects have over 100 fields with data coming in from 3rd party API.
I've successfully inserted new record using the AttachCopy, but not update an existing record.
Here is in code of what I'm hoping to do, this doesn't work in updating the existing object:
ActionResult Update(UserMeta userMeta)
var entity = (from u
where u.UserID == userMeta.userID
var entity = dbContext.AttachCopy(userMeta);
entity.Modified = DateTime.UtcNow;
The parameter userMeta object is populated from a form view and has the updated field values. The userMeta class was generated through openaccess database first mapping, so it's the same class definition as entity object.