public IActionResult OnGetRemove(Guid id) { if (_gradebook.RemoveGrade(id)) { MessageSuccess += "Record removed successfully (" + id + ")"; } return(RedirectToPage("./Index")); }
public IActionResult OnGetRemove(Guid id) { if (_gradebook.RemoveGrade(id)) { MessageSuccess += $"Record removed successfully ({id})"; } else { MessageError += $"Record id={id} not found!"; } return(RedirectToPage("./Index")); }