示例#1
0
        public async Task <ProductResponse> HandleAsncy(int id)
        {
            var item = await repository.GetByIdAsync <Product>(id);

            return(ProductResponse.FromProduct(item));
        }
示例#2
0
        public async Task <ActionResult <ProductResponse> > HandleAsncy(ProductRequest request)
        {
            var product = await useCase.Handle(request.ToProduct());

            return(ProductResponse.FromProduct(product));
        }
示例#3
0
        public async Task <ActionResult <ProductResponse> > HandleAsncy(int id, ProductRequest request)
        {
            var response = await this.useCase.Handle(request.ToProduct(id));

            return(ProductResponse.FromProduct(response));
        }