Exemplo n.º 1
0
 public MultiCriteriaChoiceController(ApplicationDbContext context,
                                      IMapper mapper,
                                      AbstractTableRepository <MultiCriteriaTask> repository,
                                      AbstractRepository <User> userRepository)
     : base(context, mapper, repository, userRepository)
 {
 }
Exemplo n.º 2
0
        public AccountManager(AbstractRepository <Account> repository, IPasswordManager passwordManager)
        {
            _repository      = repository;
            _passwordManager = passwordManager;

            ReadContext = repository;
        }
Exemplo n.º 3
0
 public TransportController(ApplicationDbContext context,
                            IMapper mapper,
                            AbstractTableRepository <TableTransportTask> repository,
                            AbstractRepository <User> userRepository)
     : base(context, mapper, repository, userRepository)
 {
 }
Exemplo n.º 4
0
        public static ISession GetSession <TEntity>(this AbstractRepository <TEntity> repository, ShardParams shardParams) where
        TEntity : class
        {
            var nr = (AbstractRepository <TEntity>)repository;

            return(((NHibernateShardSession <TEntity>)nr.OpenSession(shardParams)).InnerSession);
        }
Exemplo n.º 5
0
        public ReviewSessionManager(AbstractRepository <ReviewSession> sessionRepository, AbstractRepository <Event> eventRepository)
        {
            _eventRepository   = eventRepository;
            _sessionRepository = sessionRepository;

            ReadContext = sessionRepository;
        }
Exemplo n.º 6
0
 public MatrixOperationsController(ApplicationDbContext context,
                                   IMapper mapper,
                                   AbstractTableRepository <MatrixOperationTask> repository,
                                   AbstractRepository <User> userRepository)
     : base(context, mapper, repository, userRepository)
 {
 }
Exemplo n.º 7
0
 /// <summary>
 /// Constructor for GradeService class
 /// </summary>
 /// <param name="stRepo">Student Repository object</param>
 /// <param name="hwRepo">Homework Repository object</param>
 /// <param name="grRepo">Grade Repository object</param>
 public GradeService(AbstractRepository <int, Student> stRepo,
                     AbstractRepository <string, Homework> hwRepo,
                     AbstractRepository <KeyValuePair <int, string>, Grade> grRepo)
 {
     _stRepo = stRepo;
     _hwRepo = hwRepo;
     _grRepo = grRepo;
 }
Exemplo n.º 8
0
 public AccountController(ApplicationDbContext context,
                          IMapper mapper,
                          AbstractRepository <User> repository,
                          IAuthenticationSchemeProvider authenticationSchemeProvider)
 {
     _repository = repository;
     _mapper     = mapper;
     _authenticationSchemeProvider = authenticationSchemeProvider;
 }
Exemplo n.º 9
0
 public ReviewSessionMonitor(AbstractRepository <ReviewSession> reviewRepository,
                             AbstractRepository <Account> accountRepository,
                             AbstractRepository <Event> eventRepository,
                             INotificationGenerator generator, INotificationSender sender)
 {
     _accountRepository = accountRepository;
     _sender            = sender;
     _generator         = generator;
     _eventRepository   = eventRepository;
     _reviewRepository  = reviewRepository;
 }
Exemplo n.º 10
0
        public SiteKitUnitOfWork(AbstractRepository <BmiCategory> bmiCategoryRepository, AbstractRepository <Bmi> bmiRepository, AbstractRepository <Patient> patientRepository)
        {
            SiteKitDbContext       = new SiteKitDbContext();
            _bmiCategoryRepository = bmiCategoryRepository;
            _bmiCategoryRepository.SiteKitDbContext = SiteKitDbContext;

            _bmiRepository = bmiRepository;
            _bmiRepository.SiteKitDbContext = SiteKitDbContext;

            _patientRepository = patientRepository;
            _patientRepository.SiteKitDbContext = SiteKitDbContext;
        }
Exemplo n.º 11
0
 public static TTransaction CreateInstance <TTransaction>(AbstractRepository repository, string description) where TTransaction : AbstractTransaction
 {
     lock (LockObject)
     {
         Type result;
         if (!TypeCache.TryGetValue(typeof(TTransaction), out result))
         {
             result = new TransactionBuilder(typeof(TTransaction)).Create();
             TypeCache.Add(typeof(TTransaction), result);
         }
         return((TTransaction)Activator.CreateInstance(result, repository, description));
     }
 }
Exemplo n.º 12
0
        private static IQueryable <Book> BookEagerFetch(AbstractRepository repo)
        {
            var books      = repo.EntitySet <Book>();
            var categories = repo.EntitySet <Category>();
            var formats    = repo.EntitySet <Format>();

            var outerJoin = from b in books
                            join c in categories on b.Category.Id equals c.Id into gs
                            from g in gs.DefaultIfEmpty()
                            join f in formats on b.Format.Id equals f.Id into gj
                            from h in gj.DefaultIfEmpty()
                            select new Book
            {
                Id       = b.Id,
                Title    = b.Title,
                Isbn     = b.Isbn,
                Category = g,
                Format   = h
            };

            return(outerJoin);
        }
Exemplo n.º 13
0
 public void Save(AbstractRepository repo)
 {
     repo.Save <Account>(this);
 }
Exemplo n.º 14
0
 public void Save(AbstractRepository repo)
 {
     repo.Save <Category>(this);
 }
Exemplo n.º 15
0
 public static List <Category> FindAll(AbstractRepository repo)
 {
     return(repo.FindAll <Category>());
 }
Exemplo n.º 16
0
 public static Category FindByName(AbstractRepository repo, string name)
 {
     return(repo.FindOne <Category>(c => c.Name == name));
 }
Exemplo n.º 17
0
 public static Category FindById(AbstractRepository repo, int id)
 {
     return(repo.FindOne <Category>(c => c.Id == id));
 }
 public AbstarctTableController(ApplicationDbContext context, IMapper mapper, AbstractTableRepository <TEntity> repository, AbstractRepository <User> userRepository)
 {
     _repository     = repository;
     _mapper         = mapper;
     _userRepository = userRepository;
 }
Exemplo n.º 19
0
 public EstadoImporter(AbstractRepository repository)
 {
     _repository = repository;
 }
 public CidadeController(AbstractRepository repository)
 {
     _repository = repository;
 }
Exemplo n.º 21
0
 public AfricanFarmerCommoditiesUnitOfWork(
     AbstractRepository <Address> addressRepository,
     AbstractRepository <Driver> driverRepository,
     AbstractRepository <Invoice> invoiceRepository,
     AbstractRepository <Item> itemRepository,
     AbstractRepository <Itinary> itinaryRepository,
     AbstractRepository <Location> locationRepository,
     AbstractRepository <Schedule> scheduleRepository,
     AbstractRepository <Vehicle> vehicleRepository,
     AbstractRepository <SchedulesPricing> schedulesPricingRepository,
     AbstractRepository <DealsPricing> dealsPricingRepository,
     AbstractRepository <TransportPricing> transportPricingRepository,
     AbstractRepository <User> userRepository,
     AbstractRepository <Role> rolesRepository,
     AbstractRepository <UserRole> userInRolesRepository,
     AbstractRepository <VehicleCategory> vehicleCategoryRepository,
     AbstractRepository <FoodHubStorage> foodHubStorageRepository,
     AbstractRepository <VehicleCapacity> vehicleCapacityRepository,
     AbstractRepository <FoodHub> foodHubRepository,
     AbstractRepository <CommodityUnit> commodityUnitRepository,
     AbstractRepository <Commodity> commodityRepository,
     AbstractRepository <CommodityCategory> commodityCategoryRepository,
     AbstractRepository <ActiveEnrouteCommodityMonitor> activeEnrouteCommodityMonitorRepository,
     AbstractRepository <TransportSchedule> transportScheduleRepository,
     AbstractRepository <Company> companyRepository,
     AfricanFarmerCommoditiesDBContext africanFarmerCommoditiesDbContext)
 {
     AfricanFarmerCommoditiesDbContext = africanFarmerCommoditiesDbContext as AfricanFarmerCommoditiesDBContext;
     _addressRepository = addressRepository as AddressRepository;
     _addressRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _driverRepository = driverRepository as DriverRepository;
     _driverRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _invoiceRepository = invoiceRepository as InvoiceRepository;
     _invoiceRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _itemRepository = itemRepository as ItemRepository;
     _itemRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _itinaryRepository = itinaryRepository as ItinaryRepository;
     _itinaryRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _locationRepository = locationRepository as LocationRepository;
     _locationRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _scheduleRepository = scheduleRepository as ScheduleRepository;
     _scheduleRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _vehicleRepository = vehicleRepository as VehicleRepository;
     _vehicleRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _dealsPricingRepository = dealsPricingRepository as DealsPricingRepository;
     _dealsPricingRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _schedulesPricingRepository = schedulesPricingRepository as SchedulesPricingRepository;
     _schedulesPricingRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _userRepository = userRepository as UserRepository;
     _userRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _rolesRepository = rolesRepository as RolesRepository;
     _rolesRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _userInRolesRepository = userInRolesRepository as UserInRolesRepository;
     _userInRolesRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _transportPricingRepository = transportPricingRepository as TransportPricingRepository;
     _transportPricingRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _vehicleCategoryRepository = vehicleCategoryRepository as VehicleCategoryRepository;
     _vehicleCategoryRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _foodHubStorageRepository = foodHubStorageRepository as FoodHubStorageRepository;
     _foodHubStorageRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _foodHubRepository = foodHubRepository as FoodHubRepository;
     _foodHubRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _vehicleCapacityRepository = vehicleCapacityRepository as VehicleCapacityRepository;
     _vehicleCapacityRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _commodityUnitRepository = commodityUnitRepository as CommodityUnitRepository;
     _commodityUnitRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _commodityRepository = commodityRepository as CommodityRepository;
     _commodityRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _commodityCategoryRepository = commodityCategoryRepository as CommodityCategoryRepository;
     _commodityCategoryRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _activeEnrouteCommodityMonitorRepository = activeEnrouteCommodityMonitorRepository as ActiveEnrouteCommodityMonitorRepository;
     _activeEnrouteCommodityMonitorRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _transportScheduleRepostiory = transportScheduleRepository as TransportScheduleRepository;
     _transportScheduleRepostiory.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
     _companyRepository = companyRepository as CompanyRepository;
     _companyRepository.AfricanFarmerCommoditiesDBContext = africanFarmerCommoditiesDbContext;
 }
Exemplo n.º 22
0
 public static Account FindByName(AbstractRepository repo, string name)
 {
     return(repo.FindOne <Account>(a => a.NormalizedUserName.Contains(name)));
 }
Exemplo n.º 23
0
 /// <summary>
 /// Constructor for HomeWorkService class
 /// </summary>
 /// <param name="hwRepo">HomeWork repository object</param>
 public HomeworkService(AbstractRepository <string, Homework> hwRepo)
 {
     _hwRepo = hwRepo;
 }
Exemplo n.º 24
0
 public UserService(DataBaseContext db) : base()
 {
     abstractRepository = new AbstractRepository(db);
 }
 public EmployeeController(AbstractRepository <Employee> employeeRepository)
 {
     _employeeRepository = employeeRepository;
 }
Exemplo n.º 26
0
 public EstadoController(AbstractRepository repository)
 {
     _repository = repository;
 }
Exemplo n.º 27
0
 public void Update(AbstractRepository repo)
 {
     repo.Change <Account>(this);
 }
Exemplo n.º 28
0
 public void Delete(AbstractRepository repo)
 {
     repo.Delete <Account>(this);
 }
Exemplo n.º 29
0
 public static Account FindById(AbstractRepository repo, Guid id)
 {
     return(repo.FindOne <Account>(a => a.Id.Equals(id)));
 }
 public AggregatedCustomService(AbstractRepository repository)
 {
     _repository = repository;
 }