예제 #1
1
        private void SetUpGenericRepositoryStub()
        {
            _genericRepository = Substitute.For<IGenericRepository>();
            _summer2010 = new Web.Data.Entities.Session
            {
                SessionName = "Summer 2010",
                BeginDate = new DateTime(2010, 6, 1),
                EndDate = new DateTime(2010, 8, 30)
            };

            _fall2010 = new Web.Data.Entities.Session
            {
                SessionName = "Fall 2010",
                BeginDate = new DateTime(2010, 10, 1),
                EndDate = new DateTime(2011, 1, 3)
            };
            _spring2010 = new Web.Data.Entities.Session
            {
                SessionName = "Spring 2010",
                BeginDate = new DateTime(2010, 01, 1),
                EndDate = new DateTime(2010, 5, 01)
            };

            IEnumerable<Web.Data.Entities.Session> sessionList = new List<Web.Data.Entities.Session>
            {
                _summer2010,
                _fall2010,
                _spring2010
            };

            _genericRepository.GetAll<Web.Data.Entities.Session>().Returns(sessionList);
        }
예제 #2
0
 public MembershipService(IUnitOfWork unitOfWork, IGenericRepository<UserProfile> userRepository, IGenericRepository<Role> roleRepository)
 {
     this.unitOfWork = unitOfWork;
     this.userRepository = userRepository;
     this.roleRepository = roleRepository;
     //this.userRepository = new GenericRepository<UserProfile>(unitOfWork);
 }
예제 #3
0
 public TaskController(IGenericRepository<Task> taskRepository, IGenericRepository<Project> projectRepository, IGenericRepository<User> userRepository, IFileStorage fileStorage)
 {
     _taskRepository = taskRepository;
     _projectRepository = projectRepository;
     _userRepository = userRepository;
     _fileStorage = fileStorage;
 }
예제 #4
0
        public PhotoSaveService(IUnitOfWork uof)
        {

            photosDb = uof.Repository<Photo>();
            usersDb = uof.Repository<User>();
            accountsDb = uof.Repository<Account>();
        }
 public SecurityApplicationProcessingRule(ISecurityAuthorizationProvider securityAuthorizationProvider, IGenericRepository genericRepository, ISecurityContext securityContext, IObjectFactory objectFactory)
 {
     _securityAuthorizationProvider = securityAuthorizationProvider;
     _genericRepository = genericRepository;
     _securityContext = securityContext;
     _objectFactory = objectFactory;
 }
예제 #6
0
 public ComponentController(IGenericRepository<ComponentModel> componentRepository,
     IGenericRepository<ComponentCategoryModel> componentCategoryRepository 
     )
 {
     _componentRepo = componentRepository;
     _componentCategoryRepo = componentCategoryRepository;
 }
예제 #7
0
 public UsersController()
 {
     CourseDBContext context = new CourseDBContext();
     users = new GenericRepository<User>(new StorageContext<User>(context));
     roles = new RolesImpl();
     webSecurity = new WebSecurityImpl();
 }
예제 #8
0
 public LoanController(IEmailService mailService, IGenericRepository<Component> componentRepo, IGenericRepository<LoanInformation> loanInformationRepo, IGenericRepository<Loaner> loanerRepo)
 {
     _componentRepo = componentRepo;
     _loanInformationRepo = loanInformationRepo;
     _loanerRepo = loanerRepo;
     _mailService = mailService;
 }
 public CustomMembershipProvider()
 {
     var uof = DependencyResolver.Current.GetService<IUnitOfWork>();
     usersDb = uof.Repository<User>();
     accountsDb = uof.Repository<Account>();
     rolesDb = uof.Repository<Role>();
 }
예제 #10
0
 /// <summary>
 /// Constructor used by the web application itself
 /// </summary>
 public ElectiveListsController()
 {
     CourseDBContext context = new CourseDBContext();
     electiveLists = new GenericRepository<ElectiveList>(new StorageContext<ElectiveList>(context));
     courses = new GenericRepository<Course>(new StorageContext<Course>(context));
     electiveListCourses = new GenericRepository<ElectiveListCourse>(new StorageContext<ElectiveListCourse>(context));
 }
 public VerifyAccountTypeController()
 {
     _nhSessionFactory = NhDatabaseConfiguration.CreateSessionFactory();
     _repository = new AccountTypeRepository(_nhSessionFactory);
     _repositoryAsset = new AssetRepository(_nhSessionFactory);
     _identityService = new PimsIdentityService();
 }
예제 #12
0
 public UnitOfWork(IGenericRepository<Recipe> recipeRepository, IGenericRepository<Region> regionRepository,
     IGenericRepository<Category> categoryRepository)
 {
     this.recipeRepository = recipeRepository;
     this.regionRepository = regionRepository;
     this.categoryRepository = categoryRepository;
 }
예제 #13
0
        public StudentController(IGenericRepository repository, 
            IMapper<Student, ProfileModel> studentToProfileModelMapper,
            IMapper<Student, IndexModel> studentToStudentIndexModelMapper,
            IMapper<NameModel, Student> studentNameToStudentMapper, 
            IMapper<HomeAddressModel, StudentAddress> studentHomeAddressToStudentMapper,
            AzureStorageUploader fileUploader, IStudentRepository studentRepository,
            IMapper<EditableStudentBiographicalInfoModel, Student> studentBiographicalInfoToStudentMapper, 
            IParentRepository parentRepository, 
            IMapper<EditProfileParentModel, Parent> editProfileParentModelToParentMapper,
            ProgramStatusModelToProgramStatusForEditMapper programStatusModelToProgramStatusForEditMapper, 
			EditAcademicDetailModelToStudentAcademicDetailMapper editAcademicDetailModelToStudentAcademicDetailMapper)
        {
            _repository = repository;
            _studentToProfileModelMapper = studentToProfileModelMapper;
            _studentToStudentIndexModelMapper = studentToStudentIndexModelMapper;
            _fileUploader = fileUploader;
            _studentRepository = studentRepository;
            _studentBiographicalInfoToStudentMapper = studentBiographicalInfoToStudentMapper;
            _studentNameToStudentMapper = studentNameToStudentMapper;
            _studentHomeAddressToStudentMapper = studentHomeAddressToStudentMapper;
            _parentRepository = parentRepository;
            _editProfileParentModelToParentMapper = editProfileParentModelToParentMapper;
            _programStatusModelToProgramStatusForEditMapper = programStatusModelToProgramStatusForEditMapper;
            _editAcademicDetailModelToStudentAcademicDetailMapper = editAcademicDetailModelToStudentAcademicDetailMapper;
        }
 public SyncWithTokenController(IUnitOfWork uow, IGenericRepository<Rate> rateRepo, IGenericRepository<Core.DomainModel.Profile> profileRepo, IGenericRepository<Token> tokenRepo)
 {
     _uow = uow;
     _profileRepo = profileRepo;
     _tokenRepo = tokenRepo;
     _rateRepo = rateRepo;
 }
예제 #15
0
 public TransactionsHandler(DbContext dbContext, ICardAccountRepository cardAcountRepo, IGenericRepository<TransactionHistory> transactionLogRepo)
 {
     this.dbContext = dbContext;
     this.cardAcountRepo = cardAcountRepo;
     this.transactionLogRepo = transactionLogRepo;
     this.errors = new List<string>();
 }
예제 #16
0
 public ProductService(
     IUnitOfWork unitOfWork, 
     IGenericRepository<Product> productRepository)
 {
     UnitOfWork = unitOfWork;
     _productRepository = productRepository;
 }
        public PlansController(IGenericRepository<Plan> fakePlan, IGenericRepository<PlanCourse> fakePlanCourse, IGenericRepository<Semester> fakeSem, IGenericRepository<User> fakeUser, IGenericRepository<DegreeProgram> fakeDegree, IRoles fakeRoles, IWebSecurity fakeWebSecurity)
        {
            roles = fakeRoles;
            webSecurity = fakeWebSecurity;

            messagequeue = new ObjectMessageQueue();
        }
 public SubmitDriveController(IUnitOfWork uow, IGenericRepository<Rate> rateRepo, IGenericRepository<DriveReport> driveReportRepo, IGenericRepository<Token> tokenRepo)
 {
     _uow = uow;
     _driveReportRepo = driveReportRepo;
     _tokenRepo = tokenRepo;
     _rateRepo = rateRepo;
 }
예제 #19
0
 public Klasservice(IUOW uow, IGenericRepository<Klas> KlasRepository,  IGenericRepository<LeerkrachtSchoolKlas> lskRepos, IKlasRepository repository)
 {
     this.uow = uow;
     this.KlasRepository = KlasRepository;
     this.klasrepository = repository;
     this.lskRepos = lskRepos;
 }
예제 #20
0
 public LeaguesController()
 {
     //If default constructor is called, means it is "real" request
     //IDatabaseFactory factory = new MongoDBDatabaseFactory();
     IDatabaseFactory factory = new TestDatabaseFactory();
     databasePlaceholder = factory.GetLeagueRepository();
 }
예제 #21
0
 public DataManager(
    IGenericRepository<Coutry> coutries,
    IGenericRepository<Stone> stones,
    IGenericRepository<JewelPHoto> jewelPHotos,
    IGenericRepository<Material> materials,
    IGenericRepository<Cover> covers,
    IGenericRepository<Markup> markups,
    IGenericRepository<Product> products,
    IGenericRepository<Discount> discounts,
    IGenericRepository<Category> categories,
    IGenericRepository<Cart> carts,
    IGenericRepository<Order> orders,
    IGenericRepository<OrderDetail> orderDetails, 
    IGenericRepository<MethodOfDelivery> methodOfDeliveries,
    IGenericRepository<MethodOfPayment> methodOfPayments 
    )
 {
     Coutries = coutries;
        Stones = stones;
        JewelPHotos = jewelPHotos;
        Materials = materials;
        Covers = covers;
        Markups = markups;
        Products = products;
        Discounts = discounts;
        Categories = categories;
        Carts = carts;
        Orders = orders;
        OrderDetails = orderDetails;
        MethodOfDeliveries = methodOfDeliveries;
        MethodOfPayments = methodOfPayments;
 }
예제 #22
0
 public SupplierService(
     IUnitOfWork unitOfWork, 
     IGenericRepository<Supplier> supplierRepository)
 {
     UnitOfWork = unitOfWork;
     _supplierRepository = supplierRepository;
 }
예제 #23
0
 public AccountsController()
 {
     var uof = DependencyResolver.Current.GetService<IUnitOfWork>();
     accountsDb = uof.Repository<Account>();
     accountsSerialsDb = uof.Repository<AccountSerial>();
     usersDb = uof.Repository<User>();
 }
     public BrowseBySupplierController(IGenericRepository<Meal> inMeal,
 IGenericRepository<Supplier> inSupplier, IGenericRepository<Category> inCat)
     {
         mealRepo = inMeal;
         supplierRepo = inSupplier;
         categoryRepo = inCat;
     }
예제 #25
0
        public UnitOfWork()
        {
            context = new MainContext();

            userRepo = new GenericRepository<User>(context);
            roleRepo = new GenericRepository<Role>(context);
        }
예제 #26
0
 public VideoGalleryService(IUnitOfWork unitOfWork, IGenericRepository<VideoGallery> videoGalleryRepository, IGenericRepository<Project> projectRepository, IGenericRepository<Video> videoRepository)
 {
     this.unitOfWork = unitOfWork;
     this.videoGalleryRepository = videoGalleryRepository;
     this.projectRepository = projectRepository;
     this.videoRepository = videoRepository;
 }
 /// <summary>
 ///     ctor
 /// </summary>
 public GenericRepositoryTest()
 {
     _documentSessionMock = new Mock<IDocumentSession>();
     _documentStoreMock = new Mock<IDocumentStore>();
     _genericRepository = new GenericRepository<TestObject>(_documentStoreMock.Object);
     _testObjectService = new TestObjectService();
 }
예제 #28
0
 public UserService(IUnitOfWork unitOfWork, IGenericRepository<User> userRepository)
 {
     if (unitOfWork == null) throw new ArgumentNullException("unitOfWork");
     if (userRepository == null) throw new ArgumentNullException("userRepository");
     this.unitOfWork = unitOfWork;
     this.userRepository = userRepository;
 }
예제 #29
0
 public AccountTypeController(IGenericRepository<AccountType> repository, IGenericRepository<Asset> repositoryAssets, IPimsIdentityService identityService, IGenericRepository<Investor> repositoryInvestor)
 {
     _repository = repository;
     _repositoryAssets = repositoryAssets;
     _identityService = identityService;
     _repositoryInvestor = repositoryInvestor;
 }
예제 #30
0
 public EveOnlineService(
     IUnitOfWork unitOfWork,
     IEveOnlineConstellationRepository eveOnlineConstellationRepository,
     IEveOnlineTypeRepository eveOnlineTypeRepository,
     IEveOnlineRegionRepository eveOnlineRegionRepository,
     IEveOnlineSolarSystemRepository eveOnlineSolarSystemRepository,
     IGenericRepository<EveOnlineSkill> eveOnlineSkillRepository,
     IGenericRepository<EveOnlineSkillGroup> eveOnlineSkillGroupRepository,
     IGenericRepository<EveOnlineSkillTree> eveOnlineSkillTreeRepository,
     IEveOnlineRequiredSkillRepository eveOnlineRequiredSkillRepository,
     IGenericRepository<EveOnlineAttribute> eveOnlineAttributeRepository,
     IGenericRepository<UserLog> userLogRepository,
     IRoleRepository roleRepository)
 {
     UnitOfWork = unitOfWork;
     _eveOnlineConstellationRepository = eveOnlineConstellationRepository;
     _eveOnlineTypeRepository = eveOnlineTypeRepository;
     _eveOnlineRegionRepository = eveOnlineRegionRepository;
     _eveOnlineSolarSystemRepository = eveOnlineSolarSystemRepository;
     _eveOnlineSkillRepository = eveOnlineSkillRepository;
     _eveOnlineSkillGroupRepository = eveOnlineSkillGroupRepository;
     _eveOnlineSkillTreeRepository = eveOnlineSkillTreeRepository;
     _eveOnlineRequiredSkillRepository = eveOnlineRequiredSkillRepository;
     _eveOnlineAttributeRepository = eveOnlineAttributeRepository;
     _userLogRepository = userLogRepository;
     _roleRepository = roleRepository;
 }
 public ContactRequestController(IGenericRepository <ContactRequest> contactRequestRepository)
 {
     this.contactRequestRepository = contactRequestRepository;
 }
예제 #32
0
 public SellerService(IUnitOfWork db)
 {
     _database = db;
     _repos    = _database.GetRepository <Seller>();
 }
예제 #33
0
 public TrainingsController(IGenericRepository <Trainings> genericRepository)
 {
     _genericRepository = genericRepository;
 }
예제 #34
0
 public ShipmentRegistrationMapper(IGenericRepository <ShipmentRegistration> repo)
 {
     this.repo = repo;
 }
예제 #35
0
 public EtiketService(IUnitOfWork uow) : base(uow)
 {
     _etiket   = uow.GetRepository <Etiket>();
     _haber    = uow.GetRepository <Haber>();
     _kategori = uow.GetRepository <Kategori>();
 }
예제 #36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoleRepository"/> class.
 /// </summary>
 /// <param name="genericRepository">The generic repository.</param>
 /// <param name="mapper">The mapper.</param>
 public RoleRepository(IGenericRepository <Role, IRolePoco> genericRepository, IMapper mapper)
 {
     this.genericRepository = genericRepository;
     this.mapper            = mapper;
 }
예제 #37
0
 public CategoryService(IGenericRepository <Category> repository, IMapper mapper) : base(repository)
 {
     _mapper = mapper;
 }
예제 #38
0
 public LocalBusinessTypesController(IGenericRepository <LocalBusinessType> repository, IGenericRepository <BusinessType> optionsRepository)
     : base(repository, optionsRepository)
 {
 }
예제 #39
0
 public GenericService(DbContext context)
 {
     repository = new GenericRepository <T>(context);
     _context   = context;
 }
예제 #40
0
 public AidatGunService(UnitofWork uow)
 {
     _uow = uow;
     _aidatGunRepository = _uow.GetRepository <aidat_gun>();
 }
예제 #41
0
 public GlobalConfigsController(IGenericRepository <Core.DomainModel.GlobalConfig> repository)
     : base(repository)
 {
 }
예제 #42
0
 public AccountController(IGenericRepository <Customer> inCutomerRepo)
 {
     customerRepo = inCutomerRepo;
 }
 public GenericExample(IUserRepositoryGeneric userRepository, IGenericRepository <UserModel> genericRepository)
 {
     UserRepository    = userRepository;
     GenericRepository = genericRepository;
 }
예제 #44
0
 public TurnoService(IGenericRepository repository, ITurnoQuery query, ICalendarioTurnosQuery calendarioTurnosQuery)
 {
     _repository            = repository;
     _query                 = query;
     _calendarioTurnosQuery = calendarioTurnosQuery;
 }
예제 #45
0
 public ReportManager(IGenericRepository db)
 {
     _db = db;
 }
예제 #46
0
 public FileRepository(IUnitOfWork uow) : base(uow)
 {
     this._fileGRepo = this._unitOfWork.GetDataRepository <Kpi_File>();
 }
 public BuyTwoGetOneHalfPriceDiscounts(IGenericRepository <SpecialOffer> specialOfferRepository)
 {
     _specialOfferRepository = specialOfferRepository;
 }
 public MySQLDataProvider(Func <IUnitOfWork> unitOfWork, IGenericRepository <JsonReport> jsonReport)
 {
     this.JsonReports = jsonReport;
     this.UnitOfWork  = unitOfWork;
 }
 public GenericSyncService(IGenericRepository <TContext, TEntity> genericRepo)
 {
     _genericRepo = genericRepo;
 }
예제 #50
0
 public ProductService(IUnitOfWork uow, IMapper mapper)
 {
     _uow               = uow;
     _mapper            = mapper;
     _productRepository = _uow.GetRepository <Product>();
 }
예제 #51
0
 public ChildDataService(IGenericRepository genericRepository, IBlobCache cache = null) : base(cache)
 {
     this._genericRepository = genericRepository;
 }
예제 #52
0
 public MovimientoManager(IGenericRepository <Movimiento> repositorio) : base(repositorio)
 {
 }
예제 #53
0
 public StatusService(IGenericRepository repo)
 {
     _repo = repo;
 }
예제 #54
0
 public HomeController(ILogger <HomeController> logger, IGenericRepository genericRepository)
 {
     _logger            = logger;
     _genericRepository = genericRepository;
 }
예제 #55
0
 public AddressService(IGenericRepository <Address> addressRepoParam, IGenericRepository <User> userRepoParam)
 {
     addressRepo = addressRepoParam;
     userRepo    = userRepoParam;
 }
 public ConcursosController(IGenericRepository <Concurso> repository, IGenericRepository <Link> linkRepository)
 {
     _repository     = repository;
     _linkRepository = linkRepository;
 }
예제 #57
0
 public LanguesController(IGenericRepository <Langue> langueRepository)
 {
     _langueRepository = langueRepository;
 }
예제 #58
0
 public LogementService(IGenericRepository <Logement> genericRepo, ILogementRepo logementRepo)
 {
     GenericRepo  = genericRepo;
     LogementRepo = logementRepo;
 }
예제 #59
0
 public ProductsController(IGenericRepository <Product> productRepo, IGenericRepository <ProductBrand> productBrandRepo, IGenericRepository <ProductType> proudctTypeRepo, IMapper mapper)
 {
     _mapper           = mapper;
     _proudctTypeRepo  = proudctTypeRepo;
     _productBrandRepo = productBrandRepo;
     _productRepo      = productRepo;
 }
예제 #60
0
 public ServiceRecipientController()
 {
     this.recipientRepo = new EFRecipientRepository(_db);
     this.addressRepo   = new EFAddressRepository(_db);
 }