public void RemoveWorkSheetOrder(MunkalapRendeles order) { using (var context = new CarMechanicContext(_options)) { var result = context.MunkalapRendelesek.FirstOrDefault(x => x.Id == order.Id); if (result != null) { context.MunkalapRendelesek.Remove(result); context.SaveChanges(); } } }
public IActionResult RemoveWorkSheetOrder([FromBody] MunkalapRendeles data) { try { var manager = new WorksheetManager(_options); manager.RemoveWorkSheetOrder(data); return(Ok()); } catch (Exception ex) { logger.Error(ex); return(BadRequest(ex.Message)); } }
public void RemoveWorkSheetOrder(MunkalapRendeles order) { _worksheetAccess.RemoveWorkSheetOrder(order); }