public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Звания = await _context.Звания.FirstOrDefaultAsync(m => m.КодЗвания == id); if (Звания == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Звания = await _context.Звания.FindAsync(id); if (Звания != null) { _context.Звания.Remove(Звания); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public Летчик(string Ф, string И, string О, Звания звания) : base(Ф, И, О) { Звание = звания; }