public MultiplayerController()
        {
            IUserContext userContext = new UserMSSQLContext();
            IChatContext chatContext = new ChatMSSQLContext();

            userRepository = new UserRepository(userContext);
            chatRepository = new ChatRepository(chatContext);
        }
コード例 #2
0
        public MapController()
        {
            IUserContext     IUContext = new UserMSSQLContext();
            ILocationContext ILContext = new LocationMSSQLContext();

            userRepo     = new UserRepo(IUContext);
            locationRepo = new LocationRepo(ILContext);
        }
コード例 #3
0
 public UserRepository(IUserContext context)
 {
     this.context = context;
     using (var mysqlContext = new UserMSSQLContext())
     {
         // Creates the database if not exists
         mysqlContext.Database.EnsureCreated();
         mysqlContext.SaveChanges();
     }
 }
コード例 #4
0
        public AccountController()
        {
            IUserContext context = new UserMSSQLContext();

            userRepository = new UserRepository(context);
        }