public void LoadPlayerHistory(int personId) { using (var db = new CSBCDbContext()) { var rep = new PlayerRepository(db); PlayerHistoryList = rep.GetPlayerHistory(personId); gridPlayerHistory.DataSource = PlayerHistoryList; gridPlayerHistory.DataBind(); } }
public ActionResult PlayerHistory(int peopleId) { using (var db = new CSBCDbContext()) { var rep = new PlayerRepository(db); var players = rep.GetPlayerHistory(peopleId); var viewPlayers = new List<PlayerHistory>(); return View(viewPlayers); } }