Type Alias: EntitySet<T>
EntitySet<
T>: {add:Promise<void>;remove:void; }
Strongly-typed entity unit of work add/remove functions.
Type Parameters
| Type Parameter |
|---|
T extends object |
Type declaration
add()
Adds one or more entities to the current unit of work. The entities will be tracked in the
added EntityState and will be inserted into the database when the unit of work is
committed.
Parameters
| Parameter | Type | Description |
|---|---|---|
...entities | readonly T extends FromClass<T> ? Unbrand<T<T>> : Partial<T>[] | The entities to be added to the unit of work. |
Returns
Promise<void>
A promise that resolves when the entities have been successfully added to the unit of work.
remove()
Removes one or more entities from the current unit of work. The entities will be tracked in the
removed EntityState and will be deleted from the database when the unit of work is
committed.
Parameters
| Parameter | Type | Description |
|---|---|---|
...entities | readonly Unbrand<T>[] | The entities to be removed from the unit of work. |
Returns
void