public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } DetailBill = await _context.DetailBill.FindAsync(id); if (DetailBill != null) { _context.DetailBill.Remove(DetailBill); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Customer = await _context.Customer.FindAsync(id); if (Customer != null) { _context.Customer.Remove(Customer); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Product = await _context.Product.FindAsync(id); if (Product != null) { _context.Product.Remove(Product); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Employee = await _context.Employee.FindAsync(id); if (Employee != null) { _context.Employee.Remove(Employee); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Brand = await _context.Brand.FindAsync(id); if (Brand != null) { _context.Brand.Remove(Brand); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }