Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     using (var db = new CSBCDbContext())
     {
         var repo = new PlayerRepository(db);
         Players = repo.GetDivisionPlayers(757).ToList();
         ObjectDataSource1.DataBind();
     }
 }
Example #2
0
 public List<SeasonPlayer> GetDivisionPlayers(int divisionId)
 {
     using (var db = new CSBCDbContext())
     {
         var rep = new PlayerRepository(db);
         var players = rep.GetDivisionPlayers(divisionId);
         return players.ToList();
     }
 }
Example #3
0
 private void LoadRows(int divisionId)
 {
     var rep = new PlayerRepository(new CSBCDbContext());
     var players = rep.GetDivisionPlayers(divisionId).ToList<SeasonPlayer>();
     grdPlayers.DataSource = players;
     grdPlayers.DataBind();
 }