//----------------------------------------------------------------//

        public FeedManager(ISession session, IServiceProvider provider)
        {
            _commandFactory = provider.GetService <ICommandFactory>();
            _queryFactory   = provider.GetService <IQueryFactory>();

            _genreCommand      = _commandFactory.CreateCommand <IGenreCommand>(session);
            _companyCommand    = _commandFactory.CreateCommand <ICompanyCommand>(session);
            _countryCommand    = _commandFactory.CreateCommand <ICountryCommand>(session);
            _peopleCommad      = _commandFactory.CreateCommand <IPeopleCommand>(session);
            _movieCommand      = _commandFactory.CreateCommand <IMovieCommand>(session);
            _castCommand       = _commandFactory.CreateCommand <ICastCommand>(session);
            _crewCommand       = _commandFactory.CreateCommand <ICrewCommand>(session);
            _jobCommand        = _commandFactory.CreateCommand <IJobCommand>(session);
            _departmentCommand = _commandFactory.CreateCommand <IDepartmentCommand>(session);

            _movieGenreCommand   = _commandFactory.CreateCommand <IMovieGenreCommand>(session);
            _movieCompanyCommand = _commandFactory.CreateCommand <IMovieCompanyCommand>(session);
            _movieCountryCommand = _commandFactory.CreateCommand <IMovieCountryCommand>(session);

            _movieCountryQuery = _queryFactory.CreateQuery <IMovieCountryQuery>(session);
            _movieCompanyQuery = _queryFactory.CreateQuery <IMovieCompanyQuery>(session);
            _movieGenreQuery   = _queryFactory.CreateQuery <IMovieGenreQuery>(session);

            _movieQuery      = _queryFactory.CreateQuery <IMovieQuery>(session);
            _genreQuery      = _queryFactory.CreateQuery <IGenreQuery>(session);
            _companyQuery    = _queryFactory.CreateQuery <ICompanyQuery>(session);
            _countryQuery    = _queryFactory.CreateQuery <ICountryQuery>(session);
            _castQuery       = _queryFactory.CreateQuery <ICastQuery>(session);
            _crewQuery       = _queryFactory.CreateQuery <ICrewQuery>(session);
            _peopleQuery     = _queryFactory.CreateQuery <IPeopleQuery>(session);
            _jobQuery        = _queryFactory.CreateQuery <IJobQuery>(session);
            _departmentQuery = _queryFactory.CreateQuery <IDepartmentQuery>(session);

            _loadDataService = provider.GetRequiredService <ILoadDataService>();
        }
示例#2
0
 public CountriesController(
     INotificationHandler <DomainNotification> notifications,
     IMediatorHandler mediator,
     IMapper mapper,
     IServiceProvider serviceProvider,
     ICountryQuery countryQuery) : base(notifications, mediator, mapper, serviceProvider)
 {
     _countryQuery = countryQuery;
 }
 public AddCountryCommandHandler(
     IMediatorHandler bus,
     INotificationHandler <DomainNotification> notificationHandler,
     ICountryRepository countryRepository,
     ICountryQuery countryQuery,
     IRegionQuery regionQuery)
     : base(bus, notificationHandler, new AddCountryCommandValidation(countryQuery, regionQuery))
 {
     _countryRepository = countryRepository;
     _regionQuery       = regionQuery;
 }
        public AddCountryCommandTest(
            ExampleContext context,
            ICountryQuery countryQuery,
            IRegionQuery regionQuery, ICountryRepository countryRepository) : base(context)
        {
            _context = context;

            _countryRepository = countryRepository;

            _countryQuery = countryQuery;
            _regionQuery  = regionQuery;
        }
        public AddCountryCommandValidation(
            ICountryQuery countryQuery,
            IRegionQuery regionQuery)
        {
            _countryQuery = countryQuery;
            _regionQuery  = regionQuery;

            CountryIdMustBeNotNull();
            CountryNameMustBeNotNull();

            CountryMustNotExists();
            RegionMustExists();
        }
示例#6
0
 public GeoIpController(ICountryQuery country)
 {
     _country = country;
 }