public async Task <IActionResult> GetModel(int id) { Model model = await modelRepository.FindByIdAsync(id); if (model == null) { return(NotFound()); } return(new ObjectResult(model)); }