public void Migrate(IServiceScope serviceScope, string connectionString) { if (string.IsNullOrEmpty(connectionString)) { return; } var optionsBuilder = new DbContextOptionsBuilder <StuffPackerDbContext>(); optionsBuilder.UseSqlServer(connectionString); using (var stoConnectDbContext = new StuffPackerDbContext(optionsBuilder.Options, new CurrentMigratorUser())) { if (!stoConnectDbContext.AllMigrationsApplied()) { stoConnectDbContext.Database.Migrate(); } } }
public UserProfileRepository(StuffPackerDbContext context) { _context = context; }
public FriendRepository(StuffPackerDbContext context) { _context = context; }
public ProductRepository(StuffPackerDbContext context, ICurrentUser currentUser) { _context = context; _currentUser = currentUser; }
public PackListsRepository(StuffPackerDbContext context) { _context = context; }
public PersonalizedProductRepository(StuffPackerDbContext context) { _context = context; }
public ProductGroupRepository(StuffPackerDbContext context) { _context = context; }
public FollowRepository(StuffPackerDbContext context) { _context = context; }