public async Task <IEnumerable <CarEngineWithGearboxModel> > GetEngineGearboxPairsByModelIdAsync(int id) { var items = await ReadRepository .GetAsync(_engineGearboxFiltersProvider.ByModelId(id), _engineGearboxRelationsProvider.JoinGearboxAndEngine); return(Mapper.Map <IEnumerable <CarEngineWithGearboxModel> >(items)); }
public async Task <IEnumerable <BrandModel> > GetByCountryIdAsync(int countryId) { var brands = await ReadRepository.GetAsync(_filtersProvider.ByCountryId(countryId), _relationsProvider.JoinCountry); return(Mapper.Map <IEnumerable <BrandModel> >(brands)); }
public async Task <IEnumerable <BrandModel> > GetWithSupplierAsync() { var brands = await ReadRepository.GetAsync(_filtersProvider.WithSupplier(), _relationsProvider.JoinCountry); return(Mapper.Map <IEnumerable <BrandModel> >(brands)); }
public async Task <IEnumerable <CarBodyTypeWithPriceModel> > GetByModelIdAsync(int id) { var modelSupportsBodyTypes = await ReadRepository.GetAsync(_modelBodyTypeFiltersProvider.ByModelId(id), _relationsProvider.JoinBodyType); return(Mapper.Map <IEnumerable <CarBodyTypeWithPriceModel> >(modelSupportsBodyTypes)); }
public async Task <IEnumerable <ColorCodeModel> > GetByModelIdAsync(int id) { var modelSupportsColor = await ReadRepository.GetAsync(_modelColorFiltersProvider.ByModelId(id), _modelColorRelationsProvider.JoinColor); return(Mapper.Map <IEnumerable <ColorCodeModel> >(modelSupportsColor.Select(x => x.Color))); }
public async Task <IEnumerable <UserModel> > GetAllActiveAsync() { var users = await ReadRepository.GetAsync(_filtersProvider.Active(), _relationsProvider.JoinRole); return(Mapper.Map <IEnumerable <UserModel> >(users)); }
public async Task <IEnumerable <DeliveryRequestModel> > GetByStatusIdAsync(int statusId) { var items = await ReadRepository.GetAsync(_filtersProvider.ByStatusId(statusId), _relationsProvider.JoinDeliveryRequestInfo); return(Mapper.Map <IEnumerable <DeliveryRequestModel> >(items)); }
public async Task <IEnumerable <CarModelModel> > GetByBrandIdAsync(int id) { var carModels = await ReadRepository.GetAsync(_filtersProvider.ByBrandId(id)); return(Mapper.Map <IEnumerable <CarModelModel> >(carModels)); }
public async Task <IEnumerable <CarComplectationOptionModel> > GetOptionsByComplectationIdAsync(int id) { var items = await ReadRepository.GetAsync(_complectationOptionFiltersProvider.ByComplectationId(id)); return(Mapper.Map <IEnumerable <CarComplectationOptionModel> >(items)); }
public async Task <IEnumerable <OrderModel> > GetByStatusIdAsync(int statusId) { var items = await ReadRepository.GetAsync(_filtersProvider.ByStatusId(statusId), _relationsProvider.JoinOrderDetails); return(Mapper.Map <IEnumerable <OrderModel> >(items)); }