public ActionResult DeleteMachine(int joinId) { var joinEntry = _db.EngineerMachine.FirstOrDefault(entry => entry.EngineerMachineId == joinId); _db.Remove(joinEntry); _db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteEngineer(int joinId) { var joinEntry = _db.EngineerMachine.FirstOrDefault(entry => entry.EngineerMachineId == joinId); int machineId = joinEntry.Machine.MachineId; _db.Remove(joinEntry); _db.SaveChanges(); return(RedirectToAction("Details", new { machineId = machineId })); }
public async Task Delete(Machine entity) { _context.Remove(entity); await _context.SaveChangesAsync(); }
public async Task Delete(Operation entity) { _context.Remove(entity); await _context.SaveChangesAsync(); }
public async Task Delete(ProductionLine entity) { _context.Remove(entity); await _context.SaveChangesAsync(); }
public void Delete(MachineTypeOperation entity) { _context.Entry(entity).State = EntityState.Modified; _context.Remove(entity); _context.SaveChanges(); }