public async Task EditBin(Bin bin) { Context.Bins.Attach(bin); Context.Entry(bin).State = System.Data.Entity.EntityState.Modified; await Context.SaveChangesAsync(); }
public ActionResult _Edit(Bin bin) { BinService.EditBin(bin); return RedirectToAction("Index"); }
public async Task CreateBin(Bin bin) { Context.Bins.Add(bin); await Context.SaveChangesAsync(); }
public async Task<ActionResult> _Create(Bin bin) { await BinService.CreateBin(bin); return RedirectToAction("Index"); }