Пример #1
0
 public AlbumUnitOfWork
 (
     BaseContext context,
     IRepositoryCreator <Profile> profileRepositoryCreator,
     IRepositoryCreator <Image> imageRepositoryCreator,
     IRepositoryCreator <HashTag> hashTagRepositoryCreator,
     IRepositoryCreator <Evaluation> evaluationRepositoryCreator,
     IRepositoryCreator <Subscription> subscriptionRepositoryCreator,
     IRepositoryCreator <File> fileRepositoryCreator
 )
 {
     _context = context
                ?? throw new ArgumentNullException("Context must be not null!");
     _hashTagRepository = hashTagRepositoryCreator.GetRepositoryInstance(context)
                          ?? throw new ArgumentNullException("RepositoryCreator must be not null!");
     _profileRepository = profileRepositoryCreator.GetRepositoryInstance(context)
                          ?? throw new ArgumentNullException("RepositoryCreator must be not null!");
     _fileRepository = fileRepositoryCreator.GetRepositoryInstance(context)
                       ?? throw new ArgumentNullException("RepositoryCreator must be not null!");
     _imageRepository = imageRepositoryCreator.GetRepositoryInstance(context)
                        ?? throw new ArgumentNullException("RepositoryCreator must be not null!");
     _subscriptionRepository = subscriptionRepositoryCreator.GetRepositoryInstance(context)
                               ?? throw new ArgumentNullException("RepositoryCreator must be not null!");
     _evaluationRepository = evaluationRepositoryCreator.GetRepositoryInstance(context)
                             ?? throw new ArgumentNullException("RepositoryCreator must be not null!");
 }
Пример #2
0
 protected BaseUnitOfWork(
     IContextCreator contextCreator,
     IRepositoryCreator repositoryCreator)
 {
     _contextCreator    = contextCreator;
     _repositoryCreator = repositoryCreator;
 }
Пример #3
0
 public StandardController(IRepositoryCreator repo)
     : base(repo)
 {
 }
Пример #4
0
 public CreatorController(IRepositoryCreator <TEntity> repository, IDtoTranformer <TEntity, TDto> dtoTransformer) : base(repository, dtoTransformer)
 {
 }
Пример #5
0
 public TeacherController(IRepositoryCreator repo)
     : base(repo)
 {
 }
Пример #6
0
 public CrmManager(ILogger logger, string account, string login, string pass)
     : this(account, login, pass)
 {
     this.RepositoryCreator = new LoggedRepositoryCreator(Provider, logger);
 }
Пример #7
0
 public CrmManager(string account, string login, string pass)
 {
     new InitMappings();
     Provider = new CrmProvider(account: account, login: login, pass: pass);
     this.RepositoryCreator = new BasicRepositoryCreator(Provider);
 }
Пример #8
0
 public DomainController(IRepositoryCreator repoCreator)
 {
     this.repoCreator      = repoCreator;
     this.DomainRepository = repoCreator.GetRepository <T>();
 }
Пример #9
0
 public CourseController(IRepositoryCreator repo)
     : base(repo)
 {
 }
Пример #10
0
 public StudentController(IRepositoryCreator repo)
     : base(repo)
 {
 }