//
 // Summary:
 //     Get an entity from database.
 // Return:
 //     The entity will be deleted in database.
 protected virtual TEntity GetDeleteEntity(IRpstBase <TEntity> repository, TCommand command)
 {
     return(repository.GetById(command.Model));
 }
Example #2
0
 //
 // Summary:
 //     Get an entity from database.
 // Return:
 //     The entity will be modified and updated to database.
 protected virtual async Task <TEntity> GetOldEntityAsync(IRpstBase <TEntity> repository, TCommand command)
 {
     return(repository.GetById(command.Model.Id));
 }