public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } FileKeywordDTO = await _context.FileKeywordDTO .Include(f => f.File) .Include(f => f.Keyword).FirstOrDefaultAsync(m => m.FIleKeywordId == id); if (FileKeywordDTO == null) { return(NotFound()); } ViewData["FileId"] = new SelectList(_context.FileDTO, "FileId", "FileId"); ViewData["KeywordId"] = new SelectList(_context.Set <KeywordDTO>(), "Id", "Id"); return(Page()); }
public IActionResult OnGet() { ViewData["FileId"] = new SelectList(_context.FileDTO, "FileId", "FileId"); ViewData["KeywordId"] = new SelectList(_context.Set <KeywordDTO>(), "Id", "Id"); return(Page()); }