public void ValidationTableColumnDef_Update(ValidationTableColumnDefViewModel valTableColumnDef) { var entity = new ValidationTableColumnDef(); entity.Id = valTableColumnDef.Id; entity.TableName = valTableColumnDef.TableName; entity.ColumnName = valTableColumnDef.ColumnName; parameters.ValidationTableColumnDef.Attach(entity); parameters.Entry(entity).State = EntityState.Modified; parameters.SaveChanges(); }
public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,CreationDate")] Contact contact) { if (ModelState.IsValid) { db.Entry(contact).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contact)); }