public List <Core.Game.Entities.Round> GetPlayerRounds(Guid playerId)
 {
     return(Rounds
            .Include(x => x.GameActions)
            .Include(x => x.Brand)
            .Where(x => x.PlayerId == playerId)
            .Select(x => new Core.Game.Entities.Round(x))
            .ToList());
 }
Esempio n. 2
0
        public Core.Game.Entities.Round GetRound(Expression <Func <Round, bool> > condition)
        {
            var round = Rounds
                        .Include(x => x.GameActions)
                        .Include(x => x.Brand)
                        .SingleOrDefault(condition);

            return(round == null ? null : new Core.Game.Entities.Round(round));
        }
Esempio n. 3
0
        public List <Core.Game.Entities.Round> GetPlayerRounds(Guid playerId)
        {
            var rounds = Rounds
                         .Include(x => x.GameActions)
                         .Include(x => x.Brand)
                         .Where(x => x.PlayerId == playerId)
                         .OrderBy(x => x.CreatedOn)
                         .ToList();

            return(rounds.Select(x => new Core.Game.Entities.Round(x)).ToList());
        }
        public Core.Game.Entities.Round GetRound(System.Linq.Expressions.Expression <Func <Round, bool> > condition)
        {
            var roundDto = Rounds.Include(x => x.GameActions).Include(x => x.Brand).SingleOrDefault(condition);

            return((roundDto != null) ? new Core.Game.Entities.Round(roundDto) : null);
        }