async public Task <ActionResult> AddCable(CableRoll cable) { Db.CableRolls.Add(cable); await Db.SaveChangesAsync(); return(RedirectToAction("AddCable")); }
public ActionResult EditCable(CableRoll cableRoll) { var equip = Db.CableRolls.SingleOrDefault(e => e.Id == cableRoll.Id); equip.Brand = cableRoll.Brand; equip.FeetPrice = cableRoll.FeetPrice; Db.SaveChanges(); return(RedirectToAction("ViewAllCables")); }