public async void OnGet(int?id) { if (id != null && id != 0) { Vigencia = await service.GetById(id.Value); } }
public async Task <IActionResult> OnGetDelete(int?id) { if (id.HasValue) { await service.Remove(await service.GetById(id.Value)); } return(RedirectToPage("./Index")); }