public UsersController(IUserService userService, IMapper mapper, UserManager <User> userManager, OmxDbContext context) { this.userService = userService; this.mapper = mapper; this.userManager = userManager; this.context = context; }
public static OmxDbContext GetContext() { var options = new DbContextOptionsBuilder <OmxDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options; var dbContext = new OmxDbContext(options); return(dbContext); }
public void InitializeTests() { this.dbContext = MockDbContext.GetContext(); this.mapper = MockAutoMapper.GetAutoMapper(); this.propertyService = new PropertyService(dbContext, mapper); this.mockedConfig = new Mock <IConfiguration>(); this.propertiesController = new PropertiesController(propertyService, mapper); }
public void InitializeTests() { this.dbContext = MockDbContext.GetContext(); this.mapper = MockAutoMapper.GetAutoMapper(); this.userManager = this.TestUserManager <User>(); this.userService = new UserService(dbContext, mapper, userManager); this.mockedConfig = new Mock <IConfiguration>(); this.usersController = new UsersController(userService, mapper, userManager, dbContext); }
public IndexModel(UserManager <User> userManager, SignInManager <User> signInManager, IEmailSender emailSender, OmxDbContext dbContext) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; this.dbContext = dbContext; }
public void InitializeTests() { this.dbContext = MockDbContext.GetContext(); this.mapper = MockAutoMapper.GetAutoMapper(); }
public ReportModel(OmxDbContext context, UserManager <User> userManager) { _context = context; this.userManager = userManager; }
public UserService(OmxDbContext dbContext, IMapper mapper, UserManager <User> userManager) : base(dbContext, mapper) { this.userManager = userManager; }
public PropertyService(OmxDbContext dbContext, IMapper mapper) : base(dbContext, mapper) { }
protected BaseService(OmxDbContext dbContext, IMapper mapper) { DbContext = dbContext; Mapper = mapper; }