Example #1
0
 public void GetByPeopleIDTest()
 {
     var rep = new PlayerRepository(new CSBCDbContext());
     var player = rep.GetByPeopleId(2);
     Assert.IsTrue(player != null);
     Assert.IsTrue(player.PlayerID > 0);
 }
Example #2
0
 private int GetPlayerId()
 {
     var PlayerId = 0;
     var rep = new PlayerRepository(new CSBCDbContext());
     var player = rep.GetPlayerByPersonAndSeasonId(Master.PeopleId, Master.SeasonId);
     if (player == null)
         player = rep.GetByPeopleId(Master.PeopleId);
     else
     {
         ClearPaymentFields();
     }
     if (player != null)
         PlayerId = player.PlayerID;
     return PlayerId;
 }