Пример #1
0
 public ProjectServices(IDbContextScopeFactory dbContextScopeFactory, IProjectRepository projectRepository)
 {
     if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory");
     if (projectRepository == null) throw new ArgumentNullException("projectRepository");
     _dbContextScopeFactory = dbContextScopeFactory;
     _projectRepository = projectRepository;
 }
Пример #2
0
 public PhotographServices(IDbContextScopeFactory dbContextScopeFactory, IPhotographRepository photographRepository)
 {
     if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory");
     if (photographRepository == null) throw new ArgumentNullException("photographRepository");
     _dbContextScopeFactory = dbContextScopeFactory;
     _photographRepository = photographRepository;
 }
Пример #3
0
		public UserCreationService(IDbContextScopeFactory dbContextScopeFactory, IUserRepository userRepository)
		{
			if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory");
			if (userRepository == null) throw new ArgumentNullException("userRepository");
			_dbContextScopeFactory = dbContextScopeFactory;
			_userRepository = userRepository;
		}
        public void TestSetup()
        {
            this.ambientDbContextLocator = new AmbientDbContextLocator();
            this.dbContextScopeFactory = new DbContextScopeFactory();

            this.repository = new Repository<ApplicationDbContext, ToDoItem, int>(this.ambientDbContextLocator);

            Database.SetInitializer(new ApplicationDbInitializer());
        }
 public UserApplicationService(
     IRepository<User, string> userRepository,
     IDbContextScopeFactory dbContextScopeFactory, 
     IMapper mapper,
     ILog logger)
     : base(dbContextScopeFactory, mapper, logger)
 {
     this.userRepository = userRepository;
 }
 public ToDoItemApplicationService(
     IRepository<ToDoItem, int> toDoItemRepository, 
     IRepository<User, string> userRepository, 
     IDbContextScopeFactory dbContextScopeFactory, 
     IMapper mapper, 
     ILog logger)
     : base(dbContextScopeFactory, mapper, logger)
 {
     this.toDoItemRepository = toDoItemRepository;
     this.userRepository = userRepository;
 }
Пример #7
0
        public UserQueryService(IDbContextScopeFactory dbContextScopeFactory, IUserRepository userRepository)
        {
            if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory");
            if (userRepository == null) throw new ArgumentNullException("userRepository");

            this.dbContextScopeFactory = dbContextScopeFactory;
            this.userRepository = userRepository;

            //TODO: 24.11 NEED A RULE TO DETERMINE WHICH STYLE OF DB ACCESS WE ARE USING AND WHY i.e. Service vs Repo >> The business justifications
            //Look at GetUsers - does that really belong as it does not require any complex business logic around its process...
        }
Пример #8
0
        public UserAdminstrationService(IUserRepository userRepository, IRoleRepository roleRepository, UbikUserManager<UbikUser> userManager, UbikRoleManager<UbikRole> roleManager, IViewModelCommand<RoleSaveModel> roleCommand, IViewModelCommand<NewUserSaveModel> newUserCommand, IDbContextScopeFactory dbContextScopeFactory, IEnumerable<IResourceAuthProvider> authProviders, ICacheProvider cache, IViewModelCommand<UserSaveModel> userCommand)
        {
            _userRepo = userRepository;
            _roleRepo = roleRepository;
            _userManager = userManager;
            _roleManager = roleManager;
            _roleCommand = roleCommand;
            _newUserCommand = newUserCommand;
            _dbContextScopeFactory = dbContextScopeFactory;
            _authProviders = authProviders;
            _cache = cache;
            _userCommand = userCommand;

            _userBuilder = new UserViewModelBuilder(RoleViewModels);
            _newUserBuilder = new NewUserViewModelBuilder(RoleViewModels);
            _roleBuilder = new RoleViewModelBuilder(RoleViewModels);
        }
 public UserIdentityApplicationService(
     IClaimsIdentityFactory claimsIdentityFactory,
     IPasswordHasher passwordHasher,
     IIdentityValidator<string> passwordIdentityValidator,
     IIdentityValidator<User> userIdentityValidator,
     IUserRepository userRepository,
     IDbContextScopeFactory dbContextScopeFactory,
     IUserTokenProvider userTokenProvider,
     IUserTokenTwoFactorProvider userTokenTwoFactorProvider,
     IMapper mapper,
     ILog logger)
     : base(dbContextScopeFactory, mapper, logger)
 {
     this.claimsIdentityFactory = claimsIdentityFactory;
     this.passwordHasher = passwordHasher;
     this.passwordIdentityValidator = passwordIdentityValidator;
     this.userIdentityValidator = userIdentityValidator;
     this.userRepository = userRepository;
     this.userTokenProvider = userTokenProvider;
     this.userTokenTwoFactorProvider = userTokenTwoFactorProvider;
 }
Пример #10
0
 public OrderRepository(IAmbientDbContextLocator contextLocator,
                        IDbContextScopeFactory contextScopeFactory)
 {
     _contextLocator      = contextLocator;
     _contextScopeFactory = contextScopeFactory;
 }
Пример #11
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="dbContextScopeFactory"></param>
 /// <param name="mapper"></param>
 public MenuService(IDbContextScopeFactory dbContextScopeFactory, IMapper mapper)
 {
     _dbContextScopeFactory = dbContextScopeFactory;
     _mapper = mapper;
 }
Пример #12
0
 //Constructors---------------------------------------------------------------------------------------------------------//
 public DBUserService(IDbContextScopeFactory contextScopeFac, IAppUserManager appUserManager, bool ldapAuthenticationEnabled)
 {
     this.contextScopeFac = contextScopeFac;
     this.appUserManager = appUserManager;
     this.ldapAuthenticationEnabled = ldapAuthenticationEnabled;
 }
        public void TestSetup()
        {
            this.dbContextScopeFactory = new DbContextScopeFactory();

            Database.SetInitializer(new ApplicationDbInitializer());
        }
Пример #14
0
 public EmailReportProjector(ProjectorDependencies dependencies, IDbContextScopeFactory <EmailReportDbContext> dbScopeFactory) : base(dependencies)
 {
     _dbScopeFactory = dbScopeFactory;
 }
 public AppUserRoleDeleteCommand(IDbContextScopeFactory dbContextScopeFactory, IAppUserRoleDBRepository repository) : base(dbContextScopeFactory, repository)
 {
 }
Пример #16
0
 public UserProfileService(IDbContextScopeFactory dbContextScopeFactory, IUserProfileRepository userRepository)
 {
     this._dbContextScopeFactory = dbContextScopeFactory;
     this._userRepository = userRepository;
 }
 public CheckoutController(IDbContextScopeFactory dbContextScopeFactory)
 {
     this.dbContextScopeFactory = dbContextScopeFactory;
 }
Пример #18
0
 public CompanySvc(IDbContextScopeFactory dbScopeFactory)
 {
     _dbScopeFactory = dbScopeFactory;
 }
Пример #19
0
 public VacancyService(IDbContextScopeFactory dbContextScopeFactory)
 {
     _dbContextScopeFactory = dbContextScopeFactory;
 }
Пример #20
0
 public AsyncPaginateQueryHandler(IDbContextScopeFactory dbContextScopeFactory)
     : base(dbContextScopeFactory)
 {
 }
Пример #21
0
 public GrowerGetByIdCommand(IDbContextScopeFactory dbContextScopeFactory, IGrowerDBRepository repository) : base(dbContextScopeFactory, repository)
 {
 }
Пример #22
0
 public ItemCategoryControl(IDbContextScopeFactory dbContextScopeFactory, ICategoryRepository kategorijosRepositorija, IPropertyControl savybesValdymas)
 {
     _dbContextScopeFactory = dbContextScopeFactory ?? throw new ArgumentNullException("ItemCategoryControl broke");
     _categoryRepository    = kategorijosRepositorija ?? throw new ArgumentNullException("ItemCategoryControl broke");
     _propertyControl       = savybesValdymas ?? throw new ArgumentNullException("ItemCategoryControl broke");
 }
 public FunzaColorPageQueryCommand(IDbContextScopeFactory dbContextScopeFactory, IColorDBRepository repository) : base(dbContextScopeFactory, repository)
 {
 }
Пример #24
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="dbContextScopeFactory"></param>
 public DatabaseInitService(IDbContextScopeFactory dbContextScopeFactory)
 {
     _dbContextScopeFactory = dbContextScopeFactory;
 }
Пример #25
0
 public CommandHandler(IDbContextScopeFactory scopeFactory)
 {
     _scopeFactory = scopeFactory;
 }
Пример #26
0
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="dbContextScopeFactory"></param>
 /// <param name="mapper"></param>
 public EmailSubscribeService(IDbContextScopeFactory dbContextScopeFactory, IMapper mapper)
 {
     _dbContextScopeFactory = dbContextScopeFactory;
     _mapper = mapper;
 }
 protected ApplicationServiceBase(IDbContextScopeFactory dbContextScopeFactory, IMapper mapper, ILog logger)
 {
     this.DbContextScopeFactory = dbContextScopeFactory;
     this.Mapper = mapper;
     this.Logger = logger;
 }
Пример #28
0
 public ErrorLogManager(ICRUDRespoditory<PersistedExceptionLog> repo, IDbContextScopeFactory dbContextScopeFactory)
 {
     _repo = repo;
     _dbContextScopeFactory = dbContextScopeFactory;
 }
Пример #29
0
 public void Setup()
 {
     _dbContextScopeFactory = Substitute.For<IDbContextScopeFactory>();
     _ambientDbContextLocator = Substitute.For<IAmbientDbContextLocator>();
     _photographRepository = Substitute.For<IPhotographRepository>();
     _dbContext = Substitute.For<IDbContextScope>();
     _dbContextScopeFactory.Create().Returns(_dbContext);
     _photographService = new PhotographServices(_dbContextScopeFactory, _photographRepository);
 }
Пример #30
0
 public TechnologyService(IDbContextScopeFactory dbContextScopeFactory)
 {
     _dbContextScopeFactory = dbContextScopeFactory;
 }
Пример #31
0
 public QueryHandler(IDbContextScopeFactory scopeFactory)
 {
     _scopeFactory = scopeFactory;
 }
Пример #32
0
 public ReadOnlyUnitOfWork(IDbContextScopeFactory dbContextScopeFactory, IRepositoryLocator repositoryLocator)
 {
     this.dbContextScope    = dbContextScopeFactory.CreateReadOnly();
     this.repositoryLocator = repositoryLocator;
 }
Пример #33
0
 public CommandHandler(IDbContextScopeFactory scopeFactory, IValidatorFactory validatorFactory)
 {
     _scopeFactory     = scopeFactory;
     _validatorFactory = validatorFactory;
 }
Пример #34
0
		public UserEmailService(IDbContextScopeFactory dbContextScopeFactory)
		{
			if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory");
			_dbContextScopeFactory = dbContextScopeFactory;
		}
Пример #35
0
 public UserEmailService(IDbContextScopeFactory dbContextScopeFactory)
 {
     _dbContextScopeFactory = dbContextScopeFactory ?? throw new ArgumentNullException(nameof(dbContextScopeFactory));
 }
Пример #36
0
 public UnitOfWork(IDbContextScopeFactory uow)
 {
     _uow = uow;
 }
 public BaseAsyncGenericQueryHandler(IDbContextScopeFactory dbContextScopeFactory)
 {
     _dbContextScopeFactory = dbContextScopeFactory;
 }