// 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(Vid_gruzov).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Vid_gruzovExists(Vid_gruzov.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.reys.Add(reys); 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(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(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()); } reys = await _context.reys.FindAsync(id); if (reys != null) { _context.reys.Remove(reys); 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")); }