/// <summary>
 /// Inject repository in controller
 /// </summary>
 /// <param name="photoRepository">injected object</param>
 /// <param name="albumRepository">injected object</param>
 public PhotoController(
     IPhotoRepository photoRepository,
     IAlbumRepository albumRepository)
 {
     this.photoRepository = photoRepository;
     this.albumRepository = albumRepository;
 }
 public PersonService(
     IPersonRepository personRepository, 
     IPersonGroupRepository personGroupRepository, 
     IPermissionRepository permissionRepository, 
     IPersonRoleRepository personRoleRepository, 
     IPersonOptionalFieldRepository personOptionalFieldRepository, 
     IRelationshipRepository relationshipRepository,
     IChurchMatcherRepository churchMatcherRepository,
     IGroupRepository groupRepository,
     IFamilyRepository familyRepository,
     IEmailService emailService,
     IAddressRepository addressRepository,
     IPhotoRepository photoRepository)
 {
     _personRepository = personRepository;
     _personGroupRepository = personGroupRepository;
     _permissionRepository = permissionRepository;
     _personRoleRepository = personRoleRepository;
     _personOptionalFieldRepository = personOptionalFieldRepository;
     _relationshipRepository = relationshipRepository;
     _churchMatcherRepository = churchMatcherRepository;
     _groupRepository = groupRepository;
     _familyRepository = familyRepository;
     _emailService = emailService;
     _addressRepository = addressRepository;
     _photoRepository = photoRepository;
 }
Example #3
0
 public AlbumService(IUsersRepository usersRepository, IAlbumRepository albumRepository, IPhotoRepository photoRepository, ITagRepository tagRepository)
 {
     this.mUserRepository = usersRepository;
     this.mAlbumRepository = albumRepository;
     this.mPhotoRepository = photoRepository;
     this.mTagRepository = tagRepository;
 }
Example #4
0
        public PhotoService(IPhotoRepository photoRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(photoRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _photoRepository = photoRepository;
            _referenceGenerator = referenceGenerator;
        }
Example #5
0
        public override void Dispose()
        {
            if (_photoRepository == null) return;
            _photoRepository.Dispose();
            _photoRepository = null;

            if (_profileRepository == null) return;
            _profileRepository.Dispose();
            _profileRepository = null;
        }
Example #6
0
        public HomeController(
            IPromotionRepository promotionRepository,
            IPhotoRepository photoRepository,
            IPriceListRepository priceListRepository
            )
        {
            _promotionRepository = promotionRepository;

            _photoRepository = photoRepository;

            _priceListRepository = priceListRepository;
        }
Example #7
0
 public OrderingController(IOrderingRepository orderings, 
     IOrderingHeaderContentRepository headerContent, 
     IInstrumentTypeRepository instrumentTypes,
     IClassificationRepository classifications,
     ISubClassificationRepository subClassifications,
     IPhotoRepository photos)
 {
     _orderings = orderings;
     _headerContent = headerContent;
     _photos = photos;
     _instrumentTypes = instrumentTypes;
     _classifications = classifications;
     _subClassifications = subClassifications;
 }
        public HomeController()
        {
            var permissionRepository = new PermissionRepository();
            var churchRepository = new ChurchRepository();
            _personRepository = new PersonRepository(permissionRepository, churchRepository); var birthdayRepository = new BirthdayAndAniversaryRepository();
            var personRepository = new PersonRepository(permissionRepository, new ChurchRepository());
            var usernamePasswordRepository = new UsernamePasswordRepository(permissionRepository);
            var groupRepository = new GroupRepository();
            var messageRepository = new MessageRepository();
            var messageRecepientRepository = new MessageRecepientRepository();
            var messageAttachmentRepository = new MessageAttachmentRepository();
            var emailSender = new EmailSender(messageRepository, messageRecepientRepository, messageAttachmentRepository, personRepository);
            var churchEmailTemplatesRepository = new ChurchEmailTemplatesRepository();
            var emailContentRepository = new EmailContentRepository();
            var emailContentService = new EmailContentService(emailContentRepository);
            _emailService = new EmailService(usernamePasswordRepository, personRepository, groupRepository, emailSender, emailContentService, churchEmailTemplatesRepository, permissionRepository);
            var eventRepository = new EventRepository(birthdayRepository);
            _eventService = new EventService(eventRepository, _emailService, birthdayRepository);
            _personGroupRepository = new PersonGroupRepository(_personRepository);
            _usernamePasswordRepository = new UsernamePasswordRepository(permissionRepository);

            _photoRepository = new PhotoRepository();
            _photoServices = new PhotoServices();
            _personService = new PersonService(
                _personRepository,
                new PersonGroupRepository(_personRepository),
                permissionRepository,
                new PersonRoleRepository(),
                new PersonOptionalFieldRepository(),
                new RelationshipRepository(_personRepository),
                new ChurchMatcherRepository(),
                new GroupRepository(),
                new FamilyRepository(_photoRepository),
                _emailService,
                new AddressRepository(),
                _photoRepository
                );
        }
Example #9
0
 public PhotoController()
 {
     _photoRepo = EntityPhotoRepository.Instance;
     _profileRepo = EntityProfileRepository.Instance;
     _feedRepo = EntityActivityRepository.Instance;
 }
        private IPhotoRepository _rep; // = new EfRepository();

        public PhotoController(IPhotoRepository rep)
        {
            _rep = rep;
        }
 //// If you are using Dependency Injection, you can delete the following constructor
 //public PhotosController() : this(new PhotoRepository())
 //{
 //}
 public PhotosController(IPhotoRepository photoRepository)
 {
     this.photoRepository = photoRepository;
 }
Example #12
0
 public PhotoService(IPhotoRepository repo)
 {
     Checks.Argument.IsNotNull(repo, "repo");
     _repo = repo;
 }
 public UploadController(IPhotoRepository photos)
 {
     _photosRepository = photos;
 }
 public ImagesController()
 {
     _photoRepository = new PhotoRepository();
     _photoServices = new PhotoServices();
 }
 public SearchController(IPhotoRepository repository)
 {
     this.repository = repository;
 }
 public PhotoService(IUnitOfWork uow, IPhotoRepository repository,IUserService userService)
 {
     this.uow = uow;
     this.photoRepository = repository;
     this.userService = userService;
 }
 public HomeController(IPhotoRepository repository)
 {
     this.repository = repository;
 }
        public void Setup()
        {
            _mockDbSettings.Setup(x => x.ConnectionString).Returns("TestConectionString");
            _mockContext.Setup(x => x.Properties).Returns(_mockDbSet.Object);
            _mockContext.Setup(x => x.SaveChanges()).Returns(1);
            _mockPhotoMapper.Setup(x => x.Map(It.IsAny<Photo>(), It.IsAny<Photo>())).Returns(true);

            _photoRepository = new PhotoRepository(_mockContext.Object, _mockPhotoMapper.Object);
        }
 public PhotoService(IPhotoRepository photoRepository, IImageUtility imageUtility, IGalleryModuleConfiguration galleryModuleConfiguration)
 {
     _photoRepository = photoRepository;
     _imageUtility = imageUtility;
     _galleryModuleConfiguration = galleryModuleConfiguration;
 }
 public AlbumController(IPhotoRepository repository)
 {
     this.repository = repository;
 }
Example #21
0
 public PhotoService(IPhotoRepository photoRepository)
 {
     _photoRepository = photoRepository ?? new PhotoRepository();
 }
Example #22
0
 public PhotosController(IPhotoRepository photoRepository, ILoggingRepository loggingRepository)
 {
     _photoRepository = photoRepository;
     _loggingRepository = loggingRepository;
 }
Example #23
0
 public MainProcess(IPhotoRepository photoRepository, NewTripForm newTripFrom)
 {
     _photoRepository = photoRepository;
     _newTripFrom = newTripFrom;
 }
Example #24
0
        public PhotoService(IPhotoRepository photoRepository) 
        {
            _photoRepository = photoRepository;

        }
Example #25
0
 public PhotoController(IPhotoRepository repository)
 {
     this._repository = repository;
 }
 // This constructor is not used by the MVC framework but is instead provided for ease
 // of unit testing this type. See the comments at the end of this file for more
 // information.
 public AccountController(IFormsAuthentication formsAuth, IMembershipService service, IPhotoRepository repository)
 {
     this.FormsAuth = formsAuth ?? new FormsAuthenticationService();
     this.MembershipService = service ?? new AccountMembershipService();
     this.Repository = repository ?? new PhotoRepository();
 }
 public FamilyRepository(IPhotoRepository photoRepository)
 {
     _photoRepository = photoRepository;
 }
        //private readonly IImageResizerService _imageResizerService;
        //private readonly IImageDiskService _imageDiskService;
        //private readonly IValidationService _validator;

        public TempImageStorageService(IPhotoRepository repo)
        {
            Checks.Argument.IsNotNull(repo, "repo");

            _tempImageStorageRepository = repo;
        }
Example #29
0
 public PhotoService(IUsersRepository usersRepository, IPhotoRepository photoRepository)
 {
     this.mUserRepository = usersRepository;
     this.mPhotoRepository = photoRepository;
 }