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 using Entity Framework More...
Public Member Functions | |
override async Task< Maybe< TObject > > | Delete (TId id) |
Deletes object from data source More... | |
override async Task< Maybe< TObject > > | Get (TId id) |
Gets an object from data source using it's identification More... | |
abstract Expression< Func< TObject, bool > > | GetIdValidationExpression (TId id) |
Gets the expression to check an object's identification More... | |
override async 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... | |
override async Task | Insert (TObject obj) |
Adds an object to data source More... | |
override async Task | Update (TObject newData, TObject oldData) |
Updates an object in data source More... | |
Public Member Functions inherited from KlusterKite.Data.DataFactory< TContext, TObject, TId > | |
abstract TId | GetId (TObject obj) |
Gets the object's identification from object More... | |
Protected Member Functions | |
EntityDataFactory (TContext context) | |
Initializes a new instance of the EntityDataFactory<TContext,TObject,TId> class. More... | |
abstract DbSet< TObject > | GetDbSet () |
Gets the data set from current context More... | |
Protected Member Functions inherited from KlusterKite.Data.DataFactory< TContext, TObject, TId > | |
DataFactory (TContext context) | |
Initializes a new instance of the DataFactory<TContext,TObject,TId> class. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from KlusterKite.Data.DataFactory< TContext, TObject, TId > | |
static DataFactory< TContext, TObject, TId > | CreateFactory (IComponentContext componentContext, TContext context) |
Gets the new data factory registered in DI More... | |
Properties inherited from KlusterKite.Data.DataFactory< TContext, TObject, TId > | |
TContext | Context [get] |
Gets the current data source context More... | |
Base factory to work with data objects using Entity Framework
TContext | The current data source context |
TObject | Type of data object to work with |
TId | The type of object identification field |
TObject | : | class | |
TContext | : | DbContext |
Definition at line 34 of file EntityDataFactory.cs.
|
protected |
Initializes a new instance of the EntityDataFactory<TContext,TObject,TId> class.
context | The current data source context |
Definition at line 44 of file EntityDataFactory.cs.
|
virtual |
Deletes object from data source
id | Objects identification |
Implements KlusterKite.Data.DataFactory< TContext, TObject, TId >.
Definition at line 53 of file EntityDataFactory.cs.
|
virtual |
Gets an object from data source using it's identification
id | The object's identification |
Implements KlusterKite.Data.DataFactory< TContext, TObject, TId >.
Definition at line 71 of file EntityDataFactory.cs.
|
protectedpure virtual |
Gets the data set from current context
Implemented in KlusterKite.NodeManager.ConfigurationSource.ConfigurationDataFactory, and KlusterKite.NodeManager.ConfigurationSource.MigrationDataFactory.
|
pure virtual |
Gets the expression to check an object's identification
id | The identification to check |
|
virtual |
Gets a list of objects from data source
Implements KlusterKite.Data.DataFactory< TContext, TObject, TId >.
Definition at line 85 of file EntityDataFactory.cs.
|
virtual |
Adds an object to data source
obj | The object to add |
Implements KlusterKite.Data.DataFactory< TContext, TObject, TId >.
Definition at line 129 of file EntityDataFactory.cs.
|
virtual |
Updates an object in data source
newData | The new object's data |
oldData | The old object's data |
Implements KlusterKite.Data.DataFactory< TContext, TObject, TId >.
Definition at line 141 of file EntityDataFactory.cs.