Class MultiSave
Sometimes you need to save a number of Row or other kind of updating objects, and want to do so efficiently and in a single transaction. If so, add them to an instance of this class, and ultimately persist everything using Save.
Implements
Inherited Members
Namespace: SuperOffice.Data
Assembly: SoDataBase.dll
Syntax
public class MultiSave : NestedPersistFacade, INestedPersist
Constructors
MultiSave()
Sometimes you need to save a number of Row or other kind of updating objects, and want to do so efficiently and in a single transaction. If so, add them to an instance of this class, and ultimately persist everything using Save.
Declaration
public MultiSave()
MultiSave(INestedPersist)
Sometimes you need to save a number of Row or other kind of updating objects, and want to do so efficiently and in a single transaction. If so, add them to an instance of this class, and ultimately persist everything using Save.
Declaration
public MultiSave(INestedPersist item)
Parameters
Type | Name | Description |
---|---|---|
INestedPersist | item |
MultiSave(IEnumerable<INestedPersist>)
Sometimes you need to save a number of Row or other kind of updating objects, and want to do so efficiently and in a single transaction. If so, add them to an instance of this class, and ultimately persist everything using Save.
Declaration
public MultiSave(IEnumerable<INestedPersist> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<INestedPersist> | items |
Properties
IsDeleted
Returns true if all the INestedPersist items are deleted.
Declaration
public override bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
IsMarkedForDelete
Gets or sets the IsMarkedForDelete for each item in the INestedPersist collection.
Declaration
public override bool IsMarkedForDelete { get; set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
Add(params INestedPersist[])
Sometimes you need to save a number of Row or other kind of updating objects, and want to do so efficiently and in a single transaction. If so, add them to an instance of this class, and ultimately persist everything using Save.
Declaration
public void Add(params INestedPersist[] items)
Parameters
Type | Name | Description |
---|---|---|
INestedPersist[] | items |
AddRange(IEnumerable<INestedPersist>)
Sometimes you need to save a number of Row or other kind of updating objects, and want to do so efficiently and in a single transaction. If so, add them to an instance of this class, and ultimately persist everything using Save.
Declaration
public void AddRange(IEnumerable<INestedPersist> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<INestedPersist> | items |
GetFacadingItems()
Implement this method to expose items that needs to be persisted.
Declaration
protected override IEnumerable<INestedPersist> GetFacadingItems()
Returns
Type | Description |
---|---|
IEnumerable<INestedPersist> | Collection of items that needs to be persisted. |