示例#1
0
 public IList<SelectListItem> AvailablePlayers(int poolId)
 {
     using (ApplicationDbContext context = new ApplicationDbContext())
     {
         var players = context.AvailablePlayers(poolId).OrderBy(player => player.LexicalName);
         return new SelectList(players, "Id", "LexicalName").ToList();
     }
 }