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); }
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; }
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(); }
public MyProfileController() { _userRepository = new UserRepository(); }
public UnitOfWork(string connectionString) { User = new UserRepository(connectionString); }