public void UpdateWaiter(Waiter item) { using (RestrauntContext context = new RestrauntContext()) { // TODO: Validation var attatched = context.Waiters.Attach(item); var matchingWithExistingValues = context.Entry <Waiter>(attatched); matchingWithExistingValues.State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }