public T Update(T model) { dbSet.Attach(model); context.Entry(model).State = EntityState.Modified; return(model); }
public ActionResult Edit(ProviderDetails provider) { entities.Entry(provider).State = EntityState.Modified; entities.SaveChanges(); return(RedirectToAction("Index", "Admin")); }