public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } LimbaStraina = await _context.LimbaStraina.FirstOrDefaultAsync(m => m.ID == id); if (LimbaStraina == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } LimbaStraina = await _context.LimbaStraina.FindAsync(id); if (LimbaStraina != null) { _context.LimbaStraina.Remove(LimbaStraina); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }