コード例 #1
0
        public async Task <ActionResult> GetProductById(int id)
        {
            GetProductDetailResponse response = await _productLookup.GetProductById(id);

            //if (response == null)
            //{
            //    return NotFound();
            //}
            //else
            //{
            //    return Ok(response);
            //}
            return(this.Maybe(response));
        }
        public async Task <ActionResult> GetProductById(int id)
        {
            GetProductDetailsResponse response = await _productLookup.GetProductById(id);

            return(this.Maybe(response));
        }