示例#1
0
        public async Task <IActionResult> Get(int id)
        {
            string errorMessage;

            try
            {
                var result = await _services.Get(id);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }

            return(Ok(ResponseResult.Failure <List <ProductStockDTO> >(errorMessage)));
        }