public async Task <IODataQueryable <Album> > GetAlbums(IODataQuery <Album> query) { using (var context = new ChinookEntities()) { var r = query.ApplyTo(context.Album.Include(x => x.Artist)); return(await r.ToListAsync()); } }
public async Task <IODataQueryable <Track> > GetTracks(IODataQuery <Track> query) { using (var context = new ChinookEntities()) { var r = query.ApplyTo(context.Track.Include(x => x.Album)); return(await r.ToListAsync()); } }
public async Task <IEnumerable <Artist> > GetArtists(IODataQuery <Artist> query) { using (var context = new ChinookEntities()) { var r = query.ApplyTo(context.Artist); return(await r.ToListAsync()); } }