public IActionResult Get(int id)
        {
            if (id.Equals(0) || _invoiceAccess.GetInvoice(id) == null)
            {
                return(BadRequest());
            }
            var resource = new InvoiceResource(_invoiceAccess.GetInvoice(id));
            var response = new HALResponse(resource).AddSelfLink(Request).AddLinks(
                new Link("address", "/api/Address/" + resource.AddressId + "", null, "GET"),
                new Link("bankaccount", "/api/BankAccount/" + resource.BankAccounts + "", null, "GET"),
                new Link("invoice", "/api/Invoice/", null, "GET"));

            return(Ok(response));
        }
Example #2
0
        public ViewResult DetailInvoice(Invoice invoice)
        {
            ViewBag.Title = "Factuur bekijken";

            return(View(_invoiceAccess.GetInvoice(invoice.InvoiceId)));
        }