public async Task <ActionResult <Condition> > DeleteCondition(int id) { var condition = await _context.Condition.FindAsync(id); if (condition == null) { return(NotFound()); } _context.Remove(condition); await _context.SaveChangesAsync(); return(condition); }
public async Task <ActionResult <MetaData> > DeleteMeta(int id) { var meta = await _context.MetaData.FindAsync(id); if (meta == null) { return(NotFound()); } _context.Remove(meta); await _context.SaveChangesAsync(); return(meta); }
public async Task <ActionResult <Trigger> > DeleteTrigger(int id) { var trigger = await _context.Trigger.FindAsync(id); if (trigger == null) { return(NotFound()); } _context.Remove(trigger); try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { throw; } return(trigger); }