public async Task <IHttpActionResult> CreateInvoice() { var httpContext = System.Web.HttpContext.Current; if (httpContext.Request.Files.Count > 0) { var(IsSuccess, ErrorMessage) = await invoicesProvider.CreateInvoice(httpContext.Request.Files); if (IsSuccess) { return(Ok()); } else { BadRequest(ErrorMessage); } } return(BadRequest()); }
public Task CreateInvoice([FromBody] InvoiceRequest invoice) { return(_invoicesProvider.CreateInvoice(invoice)); }