// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(reys).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!reysExists(reys.ID)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Vid_gruzov.Add(Vid_gruzov); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.marki_avtomobilua.Add(marki_avtomobilua); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(DateTime?id) { if (id == null) { return(NotFound()); } marki_avtomobilua = await _context.marki_avtomobilua.FindAsync(id); if (marki_avtomobilua != null) { _context.marki_avtomobilua.Remove(marki_avtomobilua); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(long?id) { if (id == null) { return(NotFound()); } avtomobil = await _context.avtomobil.FindAsync(id); if (avtomobil != null) { _context.avtomobil.Remove(avtomobil); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(string id) { if (id == null) { return(NotFound()); } gruz = await _context.gruz.FindAsync(id); if (gruz != null) { _context.gruz.Remove(gruz); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(short?id) { if (id == null) { return(NotFound()); } Vid_gruzov = await _context.Vid_gruzov.FindAsync(id); if (Vid_gruzov != null) { _context.Vid_gruzov.Remove(Vid_gruzov); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(string id) { if (id == null) { return(NotFound()); } sotrudnic = await _context.sotrudnic.FindAsync(id); if (sotrudnic != null) { _context.sotrudnic.Remove(sotrudnic); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(short?id) { if (id == null) { return(NotFound()); } dilznost = await _context.dilznost.FindAsync(id); if (dilznost != null) { _context.dilznost.Remove(dilznost); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }