Пример #1
0
 public BreedingController()
 {
     _breedingService = new BreedingService(new YoungBreedingRepository(_context), new BreedingComingsRepository(_context),
                                            new BeeComingsRepository(_context), new FishComingsRepository(_context), new BreedingChargesRepository(_context),
                                            new BreedingDailyProfitRepository(_context), new BeeHoneyRepository(_context), new BreedingProfitRepository(_context),
                                            new FishProfitRepository(_context), new BreedingRemindingRepository(_context), new BreedingTypeRepository(_context),
                                            new BreedingCulturesRepository(_context), new HoneyTypeRepository(_context), new UsersRepository(_context));
     _breedingCulturesRepository = new BreedingCulturesRepository(_context);
     _honeyTypeRepository        = new HoneyTypeRepository(_context);
 }
 public BreedingController()
 {
     _breedingService = new BreedingService(new YoungBreedingRepository(_context), new BreedingComingsRepository(_context),
      new BeeComingsRepository(_context), new FishComingsRepository(_context), new BreedingChargesRepository(_context),
      new BreedingDailyProfitRepository(_context), new BeeHoneyRepository(_context), new BreedingProfitRepository(_context),
      new FishProfitRepository(_context), new BreedingRemindingRepository(_context), new BreedingTypeRepository(_context),
      new BreedingCulturesRepository(_context), new HoneyTypeRepository(_context), new UsersRepository(_context));
     _breedingCulturesRepository = new BreedingCulturesRepository(_context);
     _honeyTypeRepository = new HoneyTypeRepository(_context);
 }
Пример #3
0
 public BreedingService(IYoungBreedingRepository youngBreedingRepository, IBreedingComingsRepository breedingComingsRepository, IBeeComingsRepository beeComingsRepository,
    IFishComingsRepository fishComingsRepository, IBreedingChargesRepository breedingChargesRepository, IBreedingDailyProfitRepository breedingDailyProfitRepository,
    IBeeHoneyRepository beeHoneyRepository, IBreedingProfitRepository breedingProfitsRepository, IFishProfitRepository fishProfitRepository,
    IBreedingRemindingRepository breedingRemindingRepository, IBreedingTypeRepository breedingTypeRepository, IBreedingCulturesRepository breedingCulturesRepository,
    IHoneyTypeRepository honeyTypeRepository, IUsersRepository userRepository)
 {
     _youngBreedingRepository = youngBreedingRepository;
     _breedingComingsRepository = breedingComingsRepository;
     _beeComingsRepository = beeComingsRepository;
     _fishComingsRepository = fishComingsRepository;
     _breedingChargesRepository = breedingChargesRepository;
     _breedingDailyProfitRepository = breedingDailyProfitRepository;
     _beeHoneyRepository = beeHoneyRepository;
     _breedingProfitRepository = breedingProfitsRepository;
     _fishProfitRepository = fishProfitRepository;
     _breedingRemindingRepository = breedingRemindingRepository;
     _breedingTypeRepository = breedingTypeRepository;
     _breedingCulturesRepository = breedingCulturesRepository;
     _honeyTypeRepository = honeyTypeRepository;
     _usersRepository = userRepository;
 }
Пример #4
0
 public BreedingService(IYoungBreedingRepository youngBreedingRepository, IBreedingComingsRepository breedingComingsRepository, IBeeComingsRepository beeComingsRepository,
                        IFishComingsRepository fishComingsRepository, IBreedingChargesRepository breedingChargesRepository, IBreedingDailyProfitRepository breedingDailyProfitRepository,
                        IBeeHoneyRepository beeHoneyRepository, IBreedingProfitRepository breedingProfitsRepository, IFishProfitRepository fishProfitRepository,
                        IBreedingRemindingRepository breedingRemindingRepository, IBreedingTypeRepository breedingTypeRepository, IBreedingCulturesRepository breedingCulturesRepository,
                        IHoneyTypeRepository honeyTypeRepository, IUsersRepository userRepository)
 {
     _youngBreedingRepository       = youngBreedingRepository;
     _breedingComingsRepository     = breedingComingsRepository;
     _beeComingsRepository          = beeComingsRepository;
     _fishComingsRepository         = fishComingsRepository;
     _breedingChargesRepository     = breedingChargesRepository;
     _breedingDailyProfitRepository = breedingDailyProfitRepository;
     _beeHoneyRepository            = beeHoneyRepository;
     _breedingProfitRepository      = breedingProfitsRepository;
     _fishProfitRepository          = fishProfitRepository;
     _breedingRemindingRepository   = breedingRemindingRepository;
     _breedingTypeRepository        = breedingTypeRepository;
     _breedingCulturesRepository    = breedingCulturesRepository;
     _honeyTypeRepository           = honeyTypeRepository;
     _usersRepository = userRepository;
 }
Пример #5
0
        public override void Dispose()
        {

            if (_youngBreedingRepository == null) return;
            _youngBreedingRepository.Dispose();
            _youngBreedingRepository = null;

            if (_breedingComingsRepository == null) return;
            _breedingComingsRepository.Dispose();
            _breedingComingsRepository = null;

            if (_beeComingsRepository == null) return;
            _beeComingsRepository.Dispose();
            _beeComingsRepository = null;

            if (_fishComingsRepository == null) return;
            _fishComingsRepository.Dispose();
            _fishComingsRepository = null;

            if (_breedingChargesRepository == null) return;
            _breedingChargesRepository.Dispose();
            _breedingChargesRepository = null;

            if (_breedingDailyProfitRepository == null) return;
            _breedingDailyProfitRepository.Dispose();
            _breedingDailyProfitRepository = null;

            if (_beeHoneyRepository == null) return;
            _beeHoneyRepository.Dispose();
            _beeHoneyRepository = null;

            if (_breedingProfitRepository == null) return;
            _breedingProfitRepository.Dispose();
            _breedingProfitRepository = null;

            if (_fishProfitRepository == null) return;
            _fishProfitRepository.Dispose();
            _fishProfitRepository = null;

            if (_breedingRemindingRepository == null) return;
            _breedingRemindingRepository.Dispose();
            _breedingRemindingRepository = null;

            if (_breedingTypeRepository == null) return;
            _breedingTypeRepository.Dispose();
            _breedingTypeRepository = null;

            if (_breedingCulturesRepository == null) return;
            _breedingCulturesRepository.Dispose();
            _breedingCulturesRepository = null;

            if (_honeyTypeRepository == null) return;
            _honeyTypeRepository.Dispose();
            _honeyTypeRepository = null;

            if (_usersRepository == null) return;
            _usersRepository.Dispose();
            _usersRepository = null;
        }
Пример #6
0
        public override void Dispose()
        {
            if (_youngBreedingRepository == null)
            {
                return;
            }
            _youngBreedingRepository.Dispose();
            _youngBreedingRepository = null;

            if (_breedingComingsRepository == null)
            {
                return;
            }
            _breedingComingsRepository.Dispose();
            _breedingComingsRepository = null;

            if (_beeComingsRepository == null)
            {
                return;
            }
            _beeComingsRepository.Dispose();
            _beeComingsRepository = null;

            if (_fishComingsRepository == null)
            {
                return;
            }
            _fishComingsRepository.Dispose();
            _fishComingsRepository = null;

            if (_breedingChargesRepository == null)
            {
                return;
            }
            _breedingChargesRepository.Dispose();
            _breedingChargesRepository = null;

            if (_breedingDailyProfitRepository == null)
            {
                return;
            }
            _breedingDailyProfitRepository.Dispose();
            _breedingDailyProfitRepository = null;

            if (_beeHoneyRepository == null)
            {
                return;
            }
            _beeHoneyRepository.Dispose();
            _beeHoneyRepository = null;

            if (_breedingProfitRepository == null)
            {
                return;
            }
            _breedingProfitRepository.Dispose();
            _breedingProfitRepository = null;

            if (_fishProfitRepository == null)
            {
                return;
            }
            _fishProfitRepository.Dispose();
            _fishProfitRepository = null;

            if (_breedingRemindingRepository == null)
            {
                return;
            }
            _breedingRemindingRepository.Dispose();
            _breedingRemindingRepository = null;

            if (_breedingTypeRepository == null)
            {
                return;
            }
            _breedingTypeRepository.Dispose();
            _breedingTypeRepository = null;

            if (_breedingCulturesRepository == null)
            {
                return;
            }
            _breedingCulturesRepository.Dispose();
            _breedingCulturesRepository = null;

            if (_honeyTypeRepository == null)
            {
                return;
            }
            _honeyTypeRepository.Dispose();
            _honeyTypeRepository = null;

            if (_usersRepository == null)
            {
                return;
            }
            _usersRepository.Dispose();
            _usersRepository = null;
        }