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

            userRepository = new UserRepository(userContext);
            chatRepository = new ChatRepository(chatContext);
        }
コード例 #2
0
 public ChatRepository(IChatContext context)
 {
     this.context = context;
     using (var mysqlContext = new ChatMSSQLContext())
     {
         // Creates the database if not exists
         mysqlContext.Database.EnsureCreated();
         mysqlContext.SaveChanges();
     }
 }
コード例 #3
0
        public ChatHub()
        {
            IChatContext context = new ChatMSSQLContext();

            chatRepository = new ChatRepository(context);
        }