How to use the breeze-client.EntityState.Added function in breeze-client

To help you get started, we’ve selected a few breeze-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github forCrowd / WealthFramework / ng2Client / app / main / modules / data / data.service.ts View on Github external
batches.push(this.getChanges("UserElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementItem", EntityState.Deleted));
        batches.push(this.getChanges("UserElementField", EntityState.Deleted));
        batches.push(this.getChanges("ElementField", EntityState.Deleted));
        batches.push(this.getChanges("Element", EntityState.Deleted));
        batches.push(this.getChanges("UserResourcePool", EntityState.Deleted));
        batches.push(this.getChanges("ResourcePool", EntityState.Deleted));

        batches.push(this.getChanges("ResourcePool", EntityState.Added));
        batches.push(this.getChanges("UserResourcePool", EntityState.Added));
        batches.push(this.getChanges("Element", EntityState.Added));
        batches.push(this.getChanges("ElementField", EntityState.Added));
        batches.push(this.getChanges("UserElementField", EntityState.Added));
        batches.push(this.getChanges("ElementItem", EntityState.Added));
        batches.push(this.getChanges("ElementCell", EntityState.Added));
        batches.push(this.getChanges("UserElementCell", EntityState.Added));

        // batches.push(null); // empty = save all remaining pending changes

        return batches;
        /*
            *  No we can't flatten into one request because Web API OData reorders
            *  arbitrarily, causing the database failure we're trying to avoid.
            */
    }
github forCrowd / WealthFramework / Connect2EffectDemo / app / modules / data / data.service.ts View on Github external
* 1. Deleted Todos
        * 2. Deleted TodoLists
        * 3. Added TodoLists
        * 4. Every other change
        */

        batches.push(this.getChanges("UserElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementItem", EntityState.Deleted));
        batches.push(this.getChanges("UserElementField", EntityState.Deleted));
        batches.push(this.getChanges("ElementField", EntityState.Deleted));
        batches.push(this.getChanges("Element", EntityState.Deleted));
        batches.push(this.getChanges("UserResourcePool", EntityState.Deleted));
        batches.push(this.getChanges("ResourcePool", EntityState.Deleted));

        batches.push(this.getChanges("ResourcePool", EntityState.Added));
        batches.push(this.getChanges("UserResourcePool", EntityState.Added));
        batches.push(this.getChanges("Element", EntityState.Added));
        batches.push(this.getChanges("ElementField", EntityState.Added));
        batches.push(this.getChanges("UserElementField", EntityState.Added));
        batches.push(this.getChanges("ElementItem", EntityState.Added));
        batches.push(this.getChanges("ElementCell", EntityState.Added));
        batches.push(this.getChanges("UserElementCell", EntityState.Added));

        // batches.push(null); // empty = save all remaining pending changes

        return batches;
        /*
            *  No we can't flatten into one request because Web API OData reorders
            *  arbitrarily, causing the database failure we're trying to avoid.
            */
    }
github forCrowd / WealthFramework / ng2Client / app / main / modules / data / data.service.ts View on Github external
* 1. Deleted Todos
        * 2. Deleted TodoLists
        * 3. Added TodoLists
        * 4. Every other change
        */

        batches.push(this.getChanges("UserElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementItem", EntityState.Deleted));
        batches.push(this.getChanges("UserElementField", EntityState.Deleted));
        batches.push(this.getChanges("ElementField", EntityState.Deleted));
        batches.push(this.getChanges("Element", EntityState.Deleted));
        batches.push(this.getChanges("UserResourcePool", EntityState.Deleted));
        batches.push(this.getChanges("ResourcePool", EntityState.Deleted));

        batches.push(this.getChanges("ResourcePool", EntityState.Added));
        batches.push(this.getChanges("UserResourcePool", EntityState.Added));
        batches.push(this.getChanges("Element", EntityState.Added));
        batches.push(this.getChanges("ElementField", EntityState.Added));
        batches.push(this.getChanges("UserElementField", EntityState.Added));
        batches.push(this.getChanges("ElementItem", EntityState.Added));
        batches.push(this.getChanges("ElementCell", EntityState.Added));
        batches.push(this.getChanges("UserElementCell", EntityState.Added));

        // batches.push(null); // empty = save all remaining pending changes

        return batches;
        /*
            *  No we can't flatten into one request because Web API OData reorders
            *  arbitrarily, causing the database failure we're trying to avoid.
            */
    }
github forCrowd / WealthFramework / Connect2EffectDemo / app / modules / data / data.service.ts View on Github external
* 3. Added TodoLists
        * 4. Every other change
        */

        batches.push(this.getChanges("UserElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementItem", EntityState.Deleted));
        batches.push(this.getChanges("UserElementField", EntityState.Deleted));
        batches.push(this.getChanges("ElementField", EntityState.Deleted));
        batches.push(this.getChanges("Element", EntityState.Deleted));
        batches.push(this.getChanges("UserResourcePool", EntityState.Deleted));
        batches.push(this.getChanges("ResourcePool", EntityState.Deleted));

        batches.push(this.getChanges("ResourcePool", EntityState.Added));
        batches.push(this.getChanges("UserResourcePool", EntityState.Added));
        batches.push(this.getChanges("Element", EntityState.Added));
        batches.push(this.getChanges("ElementField", EntityState.Added));
        batches.push(this.getChanges("UserElementField", EntityState.Added));
        batches.push(this.getChanges("ElementItem", EntityState.Added));
        batches.push(this.getChanges("ElementCell", EntityState.Added));
        batches.push(this.getChanges("UserElementCell", EntityState.Added));

        // batches.push(null); // empty = save all remaining pending changes

        return batches;
        /*
            *  No we can't flatten into one request because Web API OData reorders
            *  arbitrarily, causing the database failure we're trying to avoid.
            */
    }
github forCrowd / WealthFramework / ng2Client / app / main / modules / data / data.service.ts View on Github external
batches.push(this.getChanges("ElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementItem", EntityState.Deleted));
        batches.push(this.getChanges("UserElementField", EntityState.Deleted));
        batches.push(this.getChanges("ElementField", EntityState.Deleted));
        batches.push(this.getChanges("Element", EntityState.Deleted));
        batches.push(this.getChanges("UserResourcePool", EntityState.Deleted));
        batches.push(this.getChanges("ResourcePool", EntityState.Deleted));

        batches.push(this.getChanges("ResourcePool", EntityState.Added));
        batches.push(this.getChanges("UserResourcePool", EntityState.Added));
        batches.push(this.getChanges("Element", EntityState.Added));
        batches.push(this.getChanges("ElementField", EntityState.Added));
        batches.push(this.getChanges("UserElementField", EntityState.Added));
        batches.push(this.getChanges("ElementItem", EntityState.Added));
        batches.push(this.getChanges("ElementCell", EntityState.Added));
        batches.push(this.getChanges("UserElementCell", EntityState.Added));

        // batches.push(null); // empty = save all remaining pending changes

        return batches;
        /*
            *  No we can't flatten into one request because Web API OData reorders
            *  arbitrarily, causing the database failure we're trying to avoid.
            */
    }
github forCrowd / WealthFramework / Connect2EffectDemo / app / modules / data / data.service.ts View on Github external
batches.push(this.getChanges("UserElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementCell", EntityState.Deleted));
        batches.push(this.getChanges("ElementItem", EntityState.Deleted));
        batches.push(this.getChanges("UserElementField", EntityState.Deleted));
        batches.push(this.getChanges("ElementField", EntityState.Deleted));
        batches.push(this.getChanges("Element", EntityState.Deleted));
        batches.push(this.getChanges("UserResourcePool", EntityState.Deleted));
        batches.push(this.getChanges("ResourcePool", EntityState.Deleted));

        batches.push(this.getChanges("ResourcePool", EntityState.Added));
        batches.push(this.getChanges("UserResourcePool", EntityState.Added));
        batches.push(this.getChanges("Element", EntityState.Added));
        batches.push(this.getChanges("ElementField", EntityState.Added));
        batches.push(this.getChanges("UserElementField", EntityState.Added));
        batches.push(this.getChanges("ElementItem", EntityState.Added));
        batches.push(this.getChanges("ElementCell", EntityState.Added));
        batches.push(this.getChanges("UserElementCell", EntityState.Added));

        // batches.push(null); // empty = save all remaining pending changes

        return batches;
        /*
            *  No we can't flatten into one request because Web API OData reorders
            *  arbitrarily, causing the database failure we're trying to avoid.
            */
    }