コード例 #1
0
        public async Task <ActionResult <IEnumerable <PublicApi.v1.DTO.ProductWithDefect> > > GetInfoByDefectId(int id)
        {
            var productsWithDefect = (await _bll.ProductsWithDefect.AllAsyncByShopAndDefectIdDTO(id, User.GetShopId()))
                                     .Select(e => ProductWithDefectMapper.MapFromBLL(e)).ToList();

            return(productsWithDefect);
        }
コード例 #2
0
        public async Task <ActionResult <PublicApi.v1.DTO.ProductWithDefect> > GetProductWithDefect(int id)
        {
            var productWithDefect = await _bll.ProductsWithDefect.GetAsyncByShopAndIdDTO(id, User.GetShopId());

            if (productWithDefect == null)
            {
                return(NotFound());
            }

            return(ProductWithDefectMapper.MapFromBLL(productWithDefect));
        }