private void BulkUpdateEnumerableItems( IDbSet <Invoice> dbSet, Action <IDbConnection, IDbTransaction, string> action) { if (action == null) { dbSet.BulkUpdate(CreateTestData()); } else { dbSet.BulkUpdate(CreateTestData(), action); } }
private void BulkUpdateEditItems( IDbSet <Invoice> dbSet, Action <IDbConnection, IDbTransaction, string> action) { dbSet.Edit(CreateTestData()); if (action == null) { dbSet.BulkUpdate(); } else { dbSet.BulkUpdate(action); } }
public void SaveCustomers(IEnumerable <CustomerDTO> customers) { foreach (var person in customers) { _customers.Edit(person); } _customers.BulkUpdate(); }
public void UpdateData(IEnumerable <CustomerModel> dataForUpdate) { //IDbSet<CustomerModel> customersInDb = _database.GetAllData<CustomerModel>(); foreach (CustomerModel customer in dataForUpdate) { _customerModels.Edit(customer); //customersInDb.Edit(customer); } _customerModels.BulkUpdate(); //customersInDb.BulkUpdate(); }