public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(Room).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RoomExists(Room.RoomId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Level.Add(Level); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.ServiceBusNamespace.Add(ServiceBusNamespace); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ServiceBusTopic = await _context.ServiceBusTopic.FindAsync(id); if (ServiceBusTopic != null) { _context.ServiceBusTopic.Remove(ServiceBusTopic); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Office = await _context.Office.FindAsync(id); if (Office != null) { _context.Office.Remove(Office); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Level = await _context.Level.FindAsync(id); if (Level != null) { _context.Level.Remove(Level); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(string id) { if (id == null) { return(NotFound()); } ServiceBusNamespace = await _context.ServiceBusNamespace.FindAsync(id); if (ServiceBusNamespace != null) { _context.ServiceBusNamespace.Remove(ServiceBusNamespace); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }