// GET: Products/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var product = await _planeRepository.GetByIdAsync(id.Value); if (product == null) { return(NotFound()); } return(View(product)); }