public AccountProfileService(ILoggedUserProvider loggedUserProvider, IUnitOfWork unitOfWork, RepositoryFactoryBase repositoryFactory)
            : base(loggedUserProvider, unitOfWork)
        {
            if (repositoryFactory == null)
                throw new ArgumentNullException("repositoryFactory");

            _userMessageRepository = repositoryFactory.CreateRepository<UserMessage>();
            _userRepository = repositoryFactory.CreateRepository<User>();
        }
Exemplo n.º 2
0
        public ResourceService(ILoggedUserProvider loggedUserProvider, IUnitOfWork unitOfWork, RepositoryFactoryBase repositoryFactory)
            : base(loggedUserProvider, unitOfWork)
        {
            if (repositoryFactory == null)
                throw new ArgumentNullException("repositoryFactory");

            _platformRepository = repositoryFactory.CreateRepository<Platform>();
            _commentRepository = repositoryFactory.CreateRepository<Comment>();
            _userRepository = repositoryFactory.CreateRepository<User>();
            _userCommentRepository = repositoryFactory.CreateRepository<UserComment>();
        }
Exemplo n.º 3
0
        public ServiceFactory(ILoggedUserProvider loggedUserProvider, IUnitOfWork unitOfWork, RepositoryFactoryBase repositoryFactory)
        {
            if (unitOfWork == null)
                throw new ArgumentNullException("unitOfWork");
            _unitOfWork = unitOfWork;

            if (repositoryFactory == null)
                throw new ArgumentNullException("repositoryFactory");
            _repositoryFactory = repositoryFactory;

            if (loggedUserProvider == null)
                throw new ArgumentNullException("loggedUserProvider");
            _loggedUserProvider = loggedUserProvider;
        }
Exemplo n.º 4
0
        public AccountService(ILoggedUserProvider loggedUserProvider, IUnitOfWork unitOfWork, RepositoryFactoryBase repositoryFactory)
            : base(loggedUserProvider, unitOfWork)
        {
            if (repositoryFactory == null)
                throw new ArgumentNullException("repositoryFactory");

            _userRepository = repositoryFactory.CreateRepository<User>();
            _roleRepository = repositoryFactory.CreateRepository<Role>();
            _userExternalInfoRepository = repositoryFactory.CreateRepository<UserExternalInfo>();
            _userActivateTokenRepository = repositoryFactory.CreateRepository<UserActivateToken>();
            _userInfoRepository = repositoryFactory.CreateRepository<UserInfo>();
            _userResetTokenRepository = repositoryFactory.CreateRepository<UserResetToken>();
            _sexRepository = repositoryFactory.CreateRepository<Sex>();
        }