public async Task <Tbl_Products> DeleteProductAsync(int id) { var tbl_Products = await _context.Tbl_Products.FindAsync(id); _context.Remove(tbl_Products); await _context.SaveChangesAsync(); return(tbl_Products); }
public async Task <ActionResult <Tbl_Invoices> > DeleteInvoiceAsync(int id) { var tbl_Invoices = await _context.Tbl_Invoices.FindAsync(id); _context.Remove(tbl_Invoices); await _context.SaveChangesAsync(); return(tbl_Invoices); }