public IActionResult OnGet(int Id) { Mecanico = service.GetMecanicoPorId(Id); if (Mecanico == null) { return(RedirectToPage("MecanicoNoEncontrado")); } else { return(Page()); } }
public void OnGet(int?Id) { // Mecanicos = helper.GetEnumSelectList<Mecanico>(); if (Id.HasValue) { Mecanico = service.GetMecanicoPorId(Id.Value); } else { Mecanico = new Mecanico(); } }
public void OnGet(int Id) { this.Mecanico = service.GetMecanicoPorId(Id); }