public HardCodedBase() { // Using real database //var RealDatabaseContext = StorageBuilder.GetContext(); //UnitOfWork = (UnitOfWork)StorageBuilder.GetUnitOfWork(RealDatabaseContext); //DatabaseContext = RealDatabaseContext; // Using in-memory database var InMemoryDatabaseContext = StorageBuilder.GetInMemContextWithRoleData(); DatabaseContext = InMemoryDatabaseContext; UnitOfWork = (UnitOfWork)StorageBuilder.GetUnitOfWork(InMemoryDatabaseContext); // Configure auto-mapper var configuration = new MapperConfiguration(cfg => cfg.AddProfile <IdentityEntitiesToModelsMappingProfile>()); var mapper = configuration.CreateMapper(); }