public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Publicare = await _context.Publicare.FirstOrDefaultAsync(m => m.ID == id); if (Publicare == null) { return(NotFound()); } ViewData["PublicareID"] = new SelectList(_context.Set <Publicare>(), "ID", "NumelePublicarii"); return(Page()); }
public IActionResult OnGet() { ViewData["PublicareID"] = new SelectList(_context.Set <Publicare>(), "ID", "NumelePublicarii"); return(Page()); }