public IHttpActionResult DeleteSoldProducts(InvoiceRemoveProductsCommand command) { var validator = command.Validate(); if (!validator.IsValid) { return(HandleValidationFailure(validator.Errors)); } return(HandleCallback(_invoiceService.RemoveProducts(command))); }
public bool RemoveProducts(InvoiceRemoveProductsCommand command) { return(_invoiceRepository.RemoveSoldProducts(command.Id, command.SoldProductsIds)); }