Exemplo n.º 1
0
 private void BulkUpdateEnumerableItems(
     IDbSet <Invoice> dbSet,
     Action <IDbConnection, IDbTransaction, string> action)
 {
     if (action == null)
     {
         dbSet.BulkUpdate(CreateTestData());
     }
     else
     {
         dbSet.BulkUpdate(CreateTestData(), action);
     }
 }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 4
0
        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();
        }