Coffeehouse Post

Single Post Permalink

View Thread: web api IEnumerable?
  • wsdotnet

    Trying to find out which is better with WebAPI and why.

    [HttpGet]
    public IEnumerable<Invoice> GetInvoices()
    {
    ...
    }

    OR

     

    [HttpGet]
    public Invoice[] GetInvoices()
    {
    ...
    }

     

    Thanks.