Пример #1
0
        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();
        }
Пример #2
0
        public async Task Add(T entity)
        {
            await _context.Set <T>().AddAsync(entity);

            await _context.SaveChangesAsync();
        }
Пример #3
0
 public async Task <int> Complete()
 {
     return(await _context.SaveChangesAsync());
 }
Пример #4
0
        public async Task AddInvoiceDetails(InvoiceDetails invoiceDetails)
        {
            await _context.InvoiceDetails.AddAsync(invoiceDetails);

            await _context.SaveChangesAsync();
        }