public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(UserAudit).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserAuditExists(UserAudit.UserAuditID)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Images.Add(Images); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.AgentPropertyBuyerSeller.Add(AgentPropertyBuyerSeller); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Seller = await _context.Seller.FindAsync(id); if (Seller != null) { _context.Seller.Remove(Seller); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } UserAudit = await _context.UserAudit.FindAsync(id); if (UserAudit != null) { _context.UserAudit.Remove(UserAudit); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Property = await _context.Property.FindAsync(id); if (Property != null) { _context.Property.Remove(Property); 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()); } FloorPlan = await _context.FloorPlan.FindAsync(id); if (FloorPlan != null) { _context.FloorPlan.Remove(FloorPlan); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ContactDetails = await _context.ContactDetails.FindAsync(id); if (ContactDetails != null) { _context.ContactDetails.Remove(ContactDetails); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }