Beispiel #1
0
        public EntityService(IBaseRepository <Order, long> orderRepository,
                             IBaseRepository <OrderDetail, long> orderDetailRepository,
                             IBaseReadOnlyRepository <ProductType, byte> productTypeRepository,
                             IUnitOfWork unitOfWork)
        {
            this.OrderRepository       = (orderRepository as IOrderRepository);
            this.OrderDetailRepository = (orderDetailRepository as IOrderDetailRepository);
            this.ProductTypeRepository = (productTypeRepository as IProductTypeRepository);

            this.UnitOfWork = unitOfWork;
        }
Beispiel #2
0
        public EntityService(IBaseReadOnlyRepository <City, long> cityRepository,
                             IBaseReadOnlyRepository <Country, short> countryRepository,
                             IBaseRepository <Hotel, long> hotelRepository,
                             IBaseRepository <HotelPhoto, long> hotelPhotoRepository,
                             IUnitOfWork unitOfWork)
        {
            this.CityRepository       = (cityRepository as ICityRepository);
            this.CountryRepository    = (countryRepository as ICountryRepository);
            this.HotelRepository      = (hotelRepository as IHotelRepository);
            this.HotelPhotoRepository = (hotelPhotoRepository as IHotelPhotoRepository);

            this.UnitOfWork = unitOfWork;
        }
        public EntityService(IBaseReadOnlyRepository <City, long> cityRepository,
                             IBaseReadOnlyRepository <Country, short> countryRepository,
                             IBaseRepository <Bank, int> bankRepository,
                             IBaseRepository <Branch, int> branchRepository,
                             IBaseRepository <Hotel, long> hotelRepository,
                             IBaseRepository <HotelPhoto, long> hotelPhotoRepository,
                             IBaseRepository <HotelRoom, long> hotelRoomRepository,
                             IUnitOfWork unitOfWork)
        {
            this.CityRepository       = (cityRepository as ICityRepository);
            this.CountryRepository    = (countryRepository as ICountryRepository);
            this.BankRepository       = (bankRepository as IBankRepository);
            this.BranchRepository     = (branchRepository as IBranchRepository);
            this.HotelRepository      = (hotelRepository as IHotelRepository);
            this.HotelPhotoRepository = (hotelPhotoRepository as IHotelPhotoRepository);
            this.HotelRoomRepository  = (hotelRoomRepository as IHotelRoomRepository);

            this.UnitOfWork = unitOfWork;
        }
 public BaseService(IBaseReadOnlyRepository baseReadOnlyRepository)
 {
     _baseReadOnlyRepository = baseReadOnlyRepository;
 }
Beispiel #5
0
 public BaseService(IBaseRepository <TEntity> repository, IBaseReadOnlyRepository <TEntity> readOnlyRepository)
 {
     this.repository         = repository;
     this.readOnlyRepository = readOnlyRepository;
 }