public async Task <IHttpActionResult> GetInvoiceNotYetPaid() { try { return(Ok(await context.GetInvoiceNotYetPaid())); } catch (Exception ex) { return(Content(HttpStatusCode.NotFound, ex.Message)); } }
public async Task <IActionResult> GetInvoiceNotYetPaid() { try { return(Ok(await context.GetInvoiceNotYetPaid())); } catch (Exception ex) { return(BadRequest(new ErrorMessage(ex.Message))); } }