コード例 #1
0
 public DistanceService(IUnitOfWork unitOfWork, IDistanceRepository distanceRepository, IHttpContextAccessor accessor, IRequestRepository requestRepository, ILogger <DistanceService> logger, IMapper mapper, IOptionsSnapshot <AppSetting> setting) : base(setting)
 {
     _unitofWork   = unitOfWork ?? throw new ArgumentNullException(nameof(DistanceService));
     _distanceRepo = distanceRepository;
     _context      = accessor.HttpContext;
     _RequestRepo  = requestRepository;
     _logger       = logger ?? throw new ArgumentNullException(nameof(DistanceService));
     _mapper       = mapper;
 }
コード例 #2
0
        public UnitOfWork(
            IRequestInfo requestInfo,

            IColorRepository colorRepository,
            IRideStatusRepository rideStatusRepository,

            ICountryRepository countryRepository,
            IStateRepository stateRepository,
            ICityRepository cityRepository,

            IVehicleMakerRepository vehicleMakerRepository,
            IVehicleModelRepository vehicleModelRepository,
            IVehicleBodyTypeRepository vehicleBodyTypeRepository,
            IVehicleFeatureRepository vehicleFeatureRepository,
            IVehicleTransmissionRepository vehicleTransmissionRepository,
            IVehicleAssemblyRepository vehicleAssemblyRepository,
            IVehicleVehicleFeatureRepository vehicleVehicleFeatureRepository,
            IVehicleRepository vehicleRepository,

            ITravelUnitRepository travelUnitRepository,
            IDistanceUnitRepository distanceUnitRepository,
            IDriverStatusRepository driverStatusRepository,

            ICreditCardRepository creditCardRepository,
            ICurrencyRepository currencyRepository,
            ICurrencyLogRepository currencyLogRepository,

            IAccountRepository accountRepository,
            IAccountLogRepository accountLogRepository,

            IFavouriteLocationRepository favouriteLocationRepository,
            ILocationLagLonRepository locationLagLonRepository,

            IFareRepository fareRepository,
            IPackageRepository packageRepository,
            IPackageTravelUnitRepository packageTravelUnitRepository,
            IPackageVehicleAssemblyRepository packageVehicleAssemblyRepository,
            IPackageVehicleBodyTypeRepository packageVehicleBodyTypeRepository,
            IPackageVehicleFeatureRepository packageVehicleFeatureRepository,
            IPackageVehicleModelRepository packageVehicleModelRepository,
            IPackageVehicleTransmissionRepository packageVehicleTransmissionRepository,

            ISupervisorRepository supervisorRepository,
            IDriverRepository driverRepository,

            IDriverLocationRepository driverLocationRepository,
            IDriverLocationLogRepository driverLocationLogRepository,

            IDistanceRepository distanceRepository,
            ITimeTrackerRepository timeTrackerRepository,
            ICustomerRepository customerRepository,
            IRideRepository rideRepository
            )
        {
            this._requestInfo = requestInfo;

            this._colorRepository      = colorRepository;
            this._rideStatusRepository = rideStatusRepository;

            this._countryRepository = countryRepository;
            this._stateRepository   = stateRepository;
            this._cityRepository    = cityRepository;

            this._vehicleMakerRepository          = vehicleMakerRepository;
            this._vehicleModelRepository          = vehicleModelRepository;
            this._vehicleBodyTypeRepository       = vehicleBodyTypeRepository;
            this._vehicleFeatureRepository        = vehicleFeatureRepository;
            this._vehicleTransmissionRepository   = vehicleTransmissionRepository;
            this._vehicleAssemblyRepository       = vehicleAssemblyRepository;
            this._vehicleVehicleFeatureRepository = vehicleVehicleFeatureRepository;
            this._vehicleRepository = vehicleRepository;

            this._travelUnitRepository   = travelUnitRepository;
            this._distanceUnitRepository = distanceUnitRepository;
            this._driverStatusRepository = driverStatusRepository;

            this._creditCardRepository  = creditCardRepository;
            this._currencyRepository    = currencyRepository;
            this._currencyLogRepository = currencyLogRepository;

            this._accountRepository    = accountRepository;
            this._accountLogRepository = accountLogRepository;

            this._favouriteLocationRepository = favouriteLocationRepository;
            this._locationLagLonRepository    = locationLagLonRepository;

            this._fareRepository                       = fareRepository;
            this._packageRepository                    = packageRepository;
            this._packageTravelUnitRepository          = packageTravelUnitRepository;
            this._packageVehicleAssemblyRepository     = packageVehicleAssemblyRepository;
            this._packageVehicleBodyTypeRepository     = packageVehicleBodyTypeRepository;
            this._packageVehicleFeatureRepository      = packageVehicleFeatureRepository;
            this._packageVehicleModelRepository        = packageVehicleModelRepository;
            this._packageVehicleTransmissionRepository = packageVehicleTransmissionRepository;

            this._supervisorRepository = supervisorRepository;
            this._driverRepository     = driverRepository;

            this._driverLocationRepository    = driverLocationRepository;
            this._driverLocationLogRepository = driverLocationLogRepository;

            this._distanceRepository    = distanceRepository;
            this._timeTrackerRepository = timeTrackerRepository;
            this._customerRepository    = customerRepository;
            this._rideRepository        = rideRepository;
        }
コード例 #3
0
ファイル: UnitOfWork.cs プロジェクト: pooriyaprz/my-job
 public UnitOfWork(MyContext context)
 {
     _context  = context;
     Users     = new UserRepository(_context);
     Distances = new DistanceRepository(_context);
 }
コード例 #4
0
 public HomeController(IGolferRepository golferRepository, IScoreRepository scoreRepository, IDistanceRepository distanceRepository)
 {
     _golferRepository   = golferRepository;
     _scoreRepository    = scoreRepository;
     _distanceRepository = distanceRepository;
 }
コード例 #5
0
 public DistanceService(IDistanceRepository distanceRepository)
 {
     _distanceRepository = distanceRepository;
 }