public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } HealthCode = await _context.HealthCodes.FirstOrDefaultAsync(m => m.Id == id); if (HealthCode == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } HealthCode = await _context.HealthCodes.FindAsync(id); if (HealthCode != null) { _context.HealthCodes.Remove(HealthCode); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
/// <summary> /// Creates a new instance of <see cref="HealthProblem"/> /// </summary> /// <param name="code"></param> /// <param name="severity"></param> /// <param name="description"></param> public HealthProblem(HealthCode code, HealthSeverity severity, string description) { Code = code; Severity = severity; Description = description; }
protected Fix(int sortIndex, HealthCode code) { SortIndex = sortIndex; Code = code; }