コード例 #1
0
        public async Task <IActionResult> GetModel(int id)
        {
            Model model = await modelRepository.FindByIdAsync(id);

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

            return(new ObjectResult(model));
        }