public MultiplayerController() { IUserContext userContext = new UserMSSQLContext(); IChatContext chatContext = new ChatMSSQLContext(); userRepository = new UserRepository(userContext); chatRepository = new ChatRepository(chatContext); }
public MapController() { IUserContext IUContext = new UserMSSQLContext(); ILocationContext ILContext = new LocationMSSQLContext(); userRepo = new UserRepo(IUContext); locationRepo = new LocationRepo(ILContext); }
public UserRepository(IUserContext context) { this.context = context; using (var mysqlContext = new UserMSSQLContext()) { // Creates the database if not exists mysqlContext.Database.EnsureCreated(); mysqlContext.SaveChanges(); } }
public AccountController() { IUserContext context = new UserMSSQLContext(); userRepository = new UserRepository(context); }