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 }));
        }
예제 #3
0
 public async Task Delete(Machine entity)
 {
     _context.Remove(entity);
     await _context.SaveChangesAsync();
 }
예제 #4
0
 public async Task Delete(Operation entity)
 {
     _context.Remove(entity);
     await _context.SaveChangesAsync();
 }
 public async Task Delete(ProductionLine entity)
 {
     _context.Remove(entity);
     await _context.SaveChangesAsync();
 }
예제 #6
0
 public void Delete(MachineTypeOperation entity)
 {
     _context.Entry(entity).State = EntityState.Modified;
     _context.Remove(entity);
     _context.SaveChanges();
 }