public async Task UpdateComboDetails(int comboId, List <ComboDetails> newListComboDetails) { var listComboDetails = _context.ComboDetails.Where(c => c.ComboId == comboId); _context.ComboDetails.RemoveRange(listComboDetails); await _context.ComboDetails.AddRangeAsync(newListComboDetails); await _context.SaveChangesAsync(); }
public async Task Add(T entity) { await _context.Set <T>().AddAsync(entity); await _context.SaveChangesAsync(); }
public async Task <int> Complete() { return(await _context.SaveChangesAsync()); }
public async Task AddInvoiceDetails(InvoiceDetails invoiceDetails) { await _context.InvoiceDetails.AddAsync(invoiceDetails); await _context.SaveChangesAsync(); }