public UpdateDiscountResponse UpdateDiscount(UpdateDiscountRequest request) { AdministrationServiceDAO adminDAO = new AdministrationServiceDAO(); bool result = adminDAO.UpdateDiscoint(request.discounts); return(new UpdateDiscountResponse(result)); }
public UpdateDiscountResponse UpdateDiscount(UpdateDiscountRequest request) { AdministrationServiceDAO adminDAO = new AdministrationServiceDAO(); bool result = adminDAO.UpdateDiscoint(request.discounts); if (result) { return(new UpdateDiscountResponse(result)); } else { ThrowNotFoundException(request.discounts.id); return(null); } }