-
-
Save arc95/7fe76d5670b68c1b7c9c5971e2403ae4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async Task<List<AgentViewModel>> GetAgentsListAsync() | |
{ | |
using (var db = new Context()) | |
{ | |
var q = db.Agents | |
.AsEnumerable() | |
.Select(x => x.ToAgentViewModel()) | |
.OrderBy(x => x.Name); | |
return await Task.Run(() => new List<AgentViewModel>(q)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment