KlusterKite  0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
KlusterKite.Data.BaseCrudActorWithNotifications< TContext > Class Template Reference

Generic actor to perform basic crud operation on EF objects and sends

See also
UpdateMessage<TObject>

of successful operations More...

Inheritance diagram for KlusterKite.Data.BaseCrudActorWithNotifications< TContext >:
KlusterKite.Data.BaseCrudActor< TContext >

Protected Member Functions

 BaseCrudActorWithNotifications (IComponentContext componentContext, IActorRef notificationReceiver)
 Initializes a new instance of the BaseCrudActorWithNotifications<TContext> class. More...
 
override void AfterCreate< TObject > (TObject result)
 Method called after successful object creation in database More...
 
override void AfterDelete< TObject > (TObject deletedObject)
 Method called after successful object removal from database More...
 
override void AfterUpdate< TObject > (TObject newObject, TObject oldObject)
 Method called after successful object modification in database More...
 
- Protected Member Functions inherited from KlusterKite.Data.BaseCrudActor< TContext >
 BaseCrudActor (IComponentContext componentContext)
 
override bool AroundReceive (Receive receive, object message)
 
virtual TObject BeforeCreate< TObject > (TObject request)
 Method call before object creation in database More...
 
virtual TObject BeforeDelete< TObject > (TObject oldObject)
 Method call before object removal database More...
 
virtual TObject BeforeUpdate< TObject > (TObject newObject, TObject oldObject)
 Method called before object modification in database More...
 
abstract TContext GetContext ()
 Gets current data context More...
 
virtual async Task OnCollectionRequest< TObject, TId > (CollectionRequest< TObject > collectionRequest)
 Process collection requests More...
 
virtual void OnParcelException (ParcelException message)
 Handling the parcel receive exceptions More...
 
virtual async Task OnRequest< TObject, TId > (CrudActionMessage< TObject, TId > request)
 Request process method More...
 
virtual TObject OnSelect< TObject > (TObject result)
 Called on select. Sender will receive this method output. More...
 
virtual async Task< CrudActionResponse< TObject > > ProcessRequest< TObject, TId > (CrudActionMessage< TObject, TId > request)
 Request process method More...
 

Properties

IActorRef NotificationReceiver [get]
 Gets the reference to actor to receive notifications More...
 
- Properties inherited from KlusterKite.Data.BaseCrudActor< TContext >
IComponentContext ComponentContext [get]
 Gets the DI component context More...
 

Detailed Description

Generic actor to perform basic crud operation on EF objects and sends

See also
UpdateMessage<TObject>

of successful operations

Template Parameters
TContextThe database context
Type Constraints
TContext :IDisposable 

Definition at line 28 of file BaseCrudActorWithNotifications.cs.

Constructor & Destructor Documentation

◆ BaseCrudActorWithNotifications()

KlusterKite.Data.BaseCrudActorWithNotifications< TContext >.BaseCrudActorWithNotifications ( IComponentContext  componentContext,
IActorRef  notificationReceiver 
)
protected

Initializes a new instance of the BaseCrudActorWithNotifications<TContext> class.

Parameters
componentContextThe component context.
notificationReceiverReference to actor to receive notifications

Definition at line 40 of file BaseCrudActorWithNotifications.cs.

Member Function Documentation

◆ AfterCreate< TObject >()

override void KlusterKite.Data.BaseCrudActorWithNotifications< TContext >.AfterCreate< TObject > ( TObject  result)
protectedvirtual

Method called after successful object creation in database

Template Parameters
TObjectThe type of ef object
Parameters
resultCreated object

Reimplemented from KlusterKite.Data.BaseCrudActor< TContext >.

Definition at line 59 of file BaseCrudActorWithNotifications.cs.

◆ AfterDelete< TObject >()

override void KlusterKite.Data.BaseCrudActorWithNotifications< TContext >.AfterDelete< TObject > ( TObject  deletedObject)
protectedvirtual

Method called after successful object removal from database

Template Parameters
TObjectThe type of ef object
Parameters
deletedObjectThe removed object

Reimplemented from KlusterKite.Data.BaseCrudActor< TContext >.

Definition at line 75 of file BaseCrudActorWithNotifications.cs.

◆ AfterUpdate< TObject >()

override void KlusterKite.Data.BaseCrudActorWithNotifications< TContext >.AfterUpdate< TObject > ( TObject  newObject,
TObject  oldObject 
)
protectedvirtual

Method called after successful object modification in database

Template Parameters
TObjectThe type of ef object
Parameters
newObjectThe new Object.
oldObjectThe old Object.

Reimplemented from KlusterKite.Data.BaseCrudActor< TContext >.

Definition at line 96 of file BaseCrudActorWithNotifications.cs.

Property Documentation

◆ NotificationReceiver

IActorRef KlusterKite.Data.BaseCrudActorWithNotifications< TContext >.NotificationReceiver
getprotected

Gets the reference to actor to receive notifications

Definition at line 50 of file BaseCrudActorWithNotifications.cs.


The documentation for this class was generated from the following file: