예제 #1
0
        public IHttpActionResult DeleteSoldProducts(InvoiceRemoveProductsCommand command)
        {
            var validator = command.Validate();

            if (!validator.IsValid)
            {
                return(HandleValidationFailure(validator.Errors));
            }

            return(HandleCallback(_invoiceService.RemoveProducts(command)));
        }
예제 #2
0
 public bool RemoveProducts(InvoiceRemoveProductsCommand command)
 {
     return(_invoiceRepository.RemoveSoldProducts(command.Id, command.SoldProductsIds));
 }