// GET: ProductItem/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var productItem = await _productItemRepository.Query() .Include(p => p.Product) .FirstOrDefaultAsync(m => m.ProductItemId == id); if (productItem == null) { return(NotFound()); } return(View(productItem)); }
// GET: Rent/Create public IActionResult Create() { ViewData["ProductItemId"] = new SelectList(_productItemRepository.Query(), "ProductItemId", "Code"); return(View()); }