Exemplo n.º 1
0
 public ChessWeightedRecommend(ChessDbContext db, ChessPlayer self, ChessPlayer other)
 {
     DB    = db;
     Self  = self;
     Other = other;
     Calculate();
 }
Exemplo n.º 2
0
 private ChessGame(ChessDbContext db, int winnerId, int loserId)
 {
     WinnerId = winnerId;
     LoserId  = loserId;
     Winner   = db.Players.FirstOrDefault(x => x.Id == winnerId);
     Loser    = db.Players.FirstOrDefault(x => x.Id == loserId);
 }
Exemplo n.º 3
0
 private AppealsHearing(ChessDbContext db, int id)
 {
     Id        = id;
     Members   = db.GetMembersInCase(Id).ToList();
     Motions   = db.AppealsMotions.AsQueryable().Where(x => x.HearingId == id).ToList();
     Exhibits  = db.AppealsExhibits.AsQueryable().Where(x => x.HearingId == id).ToList();
     Witnesses = db.AppealsWitnesses.AsQueryable().Where(x => x.HearingId == id).ToList();
 }
Exemplo n.º 4
0
 private ArbiterVote(ChessDbContext db, int voterId)
 {
     VoterId = voterId;
     Voter   = db.Players.FirstOrDefault(x => x.Id == voterId);
 }
Exemplo n.º 5
0
 private ChessDateScore(ChessDbContext db, int playerId)
 {
     PlayerId = playerId;
     Player   = db.Players.FirstOrDefault(x => x.Id == playerId);
 }