コード例 #1
0
        private ConcurrencyTestChangeSet GetChangeSet()
        {
            IEnumerable <ARecord> aRecords;

            lock (_aRecords.SyncRoot)
            {
                aRecords = _aRecords.GetAllEntities();
            }

            IEnumerable <BRecord> bRecords;

            lock (_bRecords.SyncRoot)
            {
                bRecords = _bRecords.GetAllEntities();
            }

            IEnumerable <CRecord> cRecords;

            lock (_cRecords.SyncRoot)
            {
                cRecords = _cRecords.GetAllEntities();
            }

            // get reduced change set
            var changeSet = _changeSetFactoryProvider().CreateChangeSet(
                aRecords,
                bRecords,
                cRecords);

            return(changeSet);
        }
コード例 #2
0
        private NTierDemoChangeSet GetChangeSet()
        {
            IEnumerable <User> users;

            lock (_users.SyncRoot)
            {
                users = _users.GetAllEntities();
            }

            IEnumerable <Blog> blogs;

            lock (_blogs.SyncRoot)
            {
                blogs = _blogs.GetAllEntities();
            }

            IEnumerable <Post> posts;

            lock (_posts.SyncRoot)
            {
                posts = _posts.GetAllEntities();
            }

            // get reduced change set
            var changeSet = _changeSetFactoryProvider().CreateChangeSet(
                users,
                blogs,
                posts);

            return(changeSet);
        }
コード例 #3
0
        private TableInheritanceDemoDBChangeSet GetChangeSet()
        {
            IEnumerable <Person> people;

            lock (_people.SyncRoot)
            {
                people = _people.GetAllEntities();
            }

            IEnumerable <Address> addresses;

            lock (_addresses.SyncRoot)
            {
                addresses = _addresses.GetAllEntities();
            }

            IEnumerable <Demographic> demographics;

            lock (_demographics.SyncRoot)
            {
                demographics = _demographics.GetAllEntities();
            }

            IEnumerable <EmployeeRole> employeeRoles;

            lock (_employeeRoles.SyncRoot)
            {
                employeeRoles = _employeeRoles.GetAllEntities();
            }

            // get reduced change set
            var changeSet = _changeSetFactoryProvider().CreateChangeSet(
                people,
                addresses,
                demographics,
                employeeRoles);

            return(changeSet);
        }
コード例 #4
0
        private ProductManagerChangeSet GetChangeSet()
        {
            IEnumerable <Product> products;

            lock (_products.SyncRoot)
            {
                products = _products.GetAllEntities();
            }
            IEnumerable <ProductCategory> productCategories;

            lock (_productCategories.SyncRoot)
            {
                productCategories = _productCategories.GetAllEntities();
            }

            // get reduced change set
            var changeSet = _changeSetFactoryProvider().CreateChangeSet(
                products,
                productCategories);

            return(changeSet);
        }
コード例 #5
0
        private SimpleParentChildChangeSet GetChangeSet()
        {
            IEnumerable <Parent> parentSet;

            lock (_parentSet.SyncRoot)
            {
                parentSet = _parentSet.GetAllEntities();
            }

            IEnumerable <Child> childSet;

            lock (_childSet.SyncRoot)
            {
                childSet = _childSet.GetAllEntities();
            }

            // get reduced change set
            var changeSet = _changeSetFactoryProvider().CreateChangeSet(
                parentSet,
                childSet);

            return(changeSet);
        }