public void BorrarOrderDetail(int id) { var orderdetailDAC = new OrderDetailDAC(); orderdetailDAC.DeleteById(id); //db.Delete(id); }
public void RemoveOrderDetail(int orderId, int orderDetailId) { var detail = orderDetailDAC.FindById <OrderDetail>(orderDetailId); if (detail != null && detail.OrderId == orderId) { orderDetailDAC.DeleteById(orderDetailId); } else { logger.Warn($"Se intento eliminar un detalle de orden que no correspondia con la orden actual: orderId {orderId} - order detail id {orderDetailId}"); } }
/// <summary> /// Delete method. /// </summary> /// <param name="id"></param> public void Remove(int id) { var orderDetailDac = new OrderDetailDAC(); orderDetailDac.DeleteById(id); }