KlusterKite
0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
|
Base factory to work with data objects More...
Public Member Functions | |
abstract Task< Maybe< TObject > > | Delete (TId id) |
Deletes object from data source More... | |
abstract Task< Maybe< TObject > > | Get (TId id) |
Gets an object from data source using it's identification More... | |
abstract TId | GetId (TObject obj) |
Gets the object's identification from object More... | |
abstract Task< CollectionResponse< TObject > > | GetList (Expression< Func< TObject, bool >> filter, List< SortingCondition > sort, int? skip, int? count, ApiRequest apiRequest) |
Gets a list of objects from data source More... | |
abstract Task | Insert (TObject obj) |
Adds an object to data source More... | |
abstract Task | Update (TObject newData, TObject oldData) |
Updates an object in data source More... | |
Static Public Member Functions | |
static DataFactory< TContext, TObject, TId > | CreateFactory (IComponentContext componentContext, TContext context) |
Gets the new data factory registered in DI More... | |
Protected Member Functions | |
DataFactory (TContext context) | |
Initializes a new instance of the DataFactory<TContext,TObject,TId> class. More... | |
Properties | |
TContext | Context [get] |
Gets the current data source context More... | |
Base factory to work with data objects
TContext | The current data source context |
TObject | Type of data object to work with |
TId | The type of object identification field |
TObject | : | class |
Definition at line 31 of file DataFactory.cs.
|
protected |
Initializes a new instance of the DataFactory<TContext,TObject,TId> class.
context | The current data source context. |
Definition at line 39 of file DataFactory.cs.
|
static |
Gets the new data factory registered in DI
componentContext | The component Context. |
context | Current data context |
Definition at line 62 of file DataFactory.cs.
|
pure virtual |
Deletes object from data source
id | Objects identification |
Implemented in KlusterKite.Data.EF.EntityDataFactorySync< TContext, TObject, TId >, and KlusterKite.Data.EF.EntityDataFactory< TContext, TObject, TId >.
|
pure virtual |
Gets an object from data source using it's identification
id | The object's identification |
Implemented in KlusterKite.Data.EF.EntityDataFactorySync< TContext, TObject, TId >, and KlusterKite.Data.EF.EntityDataFactory< TContext, TObject, TId >.
|
pure virtual |
Gets the object's identification from object
obj | The data object |
|
pure virtual |
Gets a list of objects from data source
filter | The filter condition. |
sort | The sort condition. |
skip | The number of objects to skip from select |
count | The maximum number of objects to return. Returns all on null. |
apiRequest | The original ApiRequest. Optional. |
Implemented in KlusterKite.Data.EF.EntityDataFactorySync< TContext, TObject, TId >, and KlusterKite.Data.EF.EntityDataFactory< TContext, TObject, TId >.
|
pure virtual |
Adds an object to data source
obj | The object to add |
Implemented in KlusterKite.Data.EF.EntityDataFactorySync< TContext, TObject, TId >, and KlusterKite.Data.EF.EntityDataFactory< TContext, TObject, TId >.
|
pure virtual |
Updates an object in data source
newData | The new object's data |
oldData | The old object's data |
Implemented in KlusterKite.Data.EF.EntityDataFactorySync< TContext, TObject, TId >, and KlusterKite.Data.EF.EntityDataFactory< TContext, TObject, TId >.
|
getprotected |
Gets the current data source context
Definition at line 48 of file DataFactory.cs.