/// <summary> /// Get all invocies /// </summary> /// <returns>Invoices with link information and template about add invoice</returns> // GET: api/Invoices public IHttpActionResult Get() { // Get all var c = m.InvoiceGetAll(); // Create a hypermedia representation InvoicesLinked result = new InvoicesLinked(Mapper.Map <IEnumerable <InvoiceWithLink> >(c)); return(Ok(result)); }
// GET: api/Invoices /// <summary> /// All invoices /// </summary> /// <returns>Collection of invoice objects</returns> public IHttpActionResult Get() { // Fetch collection var c = m.InvoiceGetAll(); // Attention 45 - Invoices, get all, create a hypermedia representation InvoicesLinked result = new InvoicesLinked (Mapper.Map <IEnumerable <InvoiceWithLink> >(c)); return(Ok(result)); }