コード例 #1
0
        public async Task <SupplierModel> GetByBrandIdAsync(int id)
        {
            var supplier = await ReadRepository.GetSingleAsync(_filtersProvider.ByBrandId(id), _relationsProvider.JoinBrandAndCountry);

            if (supplier == null)
            {
                throw new NotFoundException("Item was not found!");
            }

            return(Mapper.Map <SupplierModel>(supplier));
        }