public AuthenticationService(IConfiguration config, WebApplicationDbContext dbContext, IMapper mapper, IPasswordHasher <User> passwordHasher) { this.config = config; this.dbContext = dbContext; this.mapper = mapper; this.passwordHasher = passwordHasher; }
public TestContext() { var options = new DbContextOptionsBuilder <WebApplicationDbContext>().UseInMemoryDatabase(databaseName: "TestDb").Options; DbContext = new WebApplicationDbContext(options); DbContext.Users.RemoveRange(DbContext.Users); DbContext.HighScores.RemoveRange(DbContext.HighScores); DbContext.SaveChanges(); Config = A.Fake <IConfiguration>(); }
public BaseTest(TestContext testContext) { DbContext = testContext.DbContext; Config = testContext.Config; if (!isInitialized) { Mapper.Initialize(config => config.AddProfile(new MapperProfile())); isInitialized = true; } MapperInstance = Mapper.Instance; }
public UserController(WebApplicationDbContext context) { _context = context; }
public UserAccountRepository(WebApplicationDbContext context) : base(context) { }
public SampleDataController(WebApplicationDbContext context) { _context = context; }
public SQLRestaurantDataService(WebApplicationDbContext webApplicationDbContext) { this.dbContext = webApplicationDbContext; }
public HighScoreService(WebApplicationDbContext dbContext, IMapper mapper) { this.dbContext = dbContext; this.mapper = mapper; }