Ejemplo n.º 1
0
 public DataAccess()
 {
     PollAppDBContext context = new PollAppDBContext();
     UserRepository = new UserRepository(context);
     CategoryRepository = new CategoryRepository(context);
     TokenRepository = new TokenRepository(context);
     QuestionRepository = new QuestionRepository(context);
     AnswerRepository = new AnswerRepository(context);
     FormRepository = new FormRepository(context);
     VotedFormsRepository = new VotedFormsRepository(context);
 }
Ejemplo n.º 2
0
 public BoardBehavior(int width, int height, string boardName)
 {
     _width = width;
     _height = height;
     _boardName = boardName;
     _syncedPlayers = 0;
     _game = new Game(_width, _height);
     _gamePieces = new List<GamePiece>();
     _selectedPiece = new GamePiece(new Point(0, 0));
     var repository = new Repository();
     _creaturesRepository = repository.Creatures;
     _heroesRepository = repository.Heroes;
     _userRepository = repository.Users;
 }
Ejemplo n.º 3
0
        public NetworkActions()
        {
            Lobbies = new Dictionary<string, Lobby>();
            History = new Dictionary<Player, string>();
            Players = new List<Player>();
            Games = new Dictionary<string, BoardBehavior>();
            var repository = new Repository();
            _userRepository = repository.Users;
            var heroRepository = repository.Heroes;
            var creaturesRepository = repository.Creatures;
            _type = GetType();

            _heroes = Mapper.Map<List<Hero>, List<HeroInfo>>(heroRepository.GetHeroes())
                            .Cast<SerializableType>()
                            .ToList();
            _creatures = Mapper.Map<List<Creature>, List<CreatureInfo>>(creaturesRepository.GetCreatures())
                               .Cast<SerializableType>()
                               .ToList();
        }
Ejemplo n.º 4
0
 public MyProfileController()
 {
     _userRepository = new UserRepository();
 }
Ejemplo n.º 5
0
 public UnitOfWork(string connectionString)
 {
     User = new UserRepository(connectionString);
 }