AjaxWithWebService.Controllers.Manager.ArtistGetAll C# (CSharp) Method

ArtistGetAll() public method

public ArtistGetAll ( ) : IEnumerable
return IEnumerable
        public IEnumerable<ArtistBase> ArtistGetAll()
        {
            return Mapper.Map<IEnumerable<ArtistBase>>(ds.Artists.OrderBy(a => a.Name));
        }

Usage Example

        public IHttpActionResult GetArtists()
        {
            var c = m.ArtistGetAll();

            // Attention - 6 - The return type is the collection (or object) type...
            // The request-handling framework automatically marshalls
            // the collection type into plain-text JSON
            return(Ok(c));
        }