public void GetPlayerDivisionTest() { context = new CSBCDbContext(); var repPeople = new PlayerRepository(context); var player = context.Players.FirstOrDefault(); //var person = repPeople.GetById(2); var repSeason = new SeasonRepository(context); var season = repSeason.GetCurrentSeason(1); var repDivision = new DivisionRepository(context); var dt = repDivision.GetPlayerDivision(1, season.SeasonID, player.PeopleID); Assert.IsTrue(dt != 0); }
private int GetDivision() { ClsDivisions oDivisions = new CSBC.Components.Season.ClsDivisions(); var rep = new DivisionRepository(new CSBCDbContext()); var rsData = rep.GetPlayerDivision(Master.CompanyId, Master.SeasonId, Master.PeopleId); try { if (rsData == 0) { Master.DivisionId = 0; } else { Master.DivisionId = rsData; } return Master.DivisionId; } catch (Exception ex) { lblError.Text = "GetDivision::" + ex.Message; return 0; } }