예제 #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)
 {
 }