Skip to content

DeleteRequestHandlerBase<TRow,TDeleteRequest,TDeleteResponse> class

namespace: Serenity.Services   assemblySerenity.Net.Services

Abstract base class for delete request handlers that share state and mode neutral helper methods between synchronous and asynchronous delete request handlers.

public abstract class DeleteRequestHandlerBase<TRow, TDeleteRequest, TDeleteResponse> : 
    IDeleteRequestHandler
    where TRow : class, IRow, IIdRow, new()
    where TDeleteRequest : DeleteRequest
    where TDeleteResponse : DeleteResponse, new()
parameter description
TRow Entity type
TDeleteRequest Delete request type
TDeleteResponse Delete response type
context Request context

Public Members

name description
Cache { get; } Gets the two level cache from the request context.
Connection { get; } Gets the current connection.
Context { get; } Gets the request context.
Localizer { get; } Gets the localizer from the request context.
Permissions { get; } Gets the permission service from the request context.
Request { get; protected set; } Gets the request object.
Response { get; protected set; } Gets the response object.
Row { get; protected set; } Gets the entity being deleted.
StateBag { get; } A state bag for behaviors to preserve state among their methods. It will be cleared before each request, e.g. Process call.
UnitOfWork { get; protected set; } Gets the current unit of work.
User { get; } Gets the current user from the request context.

Protected Members

name description
DeleteRequestHandlerBase(…) Abstract base class for delete request handlers that share state and mode neutral helper methods between synchronous and asynchronous delete request handlers.
virtual GetBehaviors() Gets the list of delete behaviors.
virtual GetDisplayOrderFilter() Gets the display order filter for current group, if the entity implements IDisplayOrderRow interface
virtual InvalidateCacheOnCommit() Attaches a cache invalidation call to to OnCommit callback of the current unit of work. This would clear cached items related to this row type.
virtual IsDeleted() Checks if the entity is already deleted
virtual ValidatePermissions() Validates the user permissions for delete operation

Exceptions

exception condition
ArgumentNullException context is null.

Remarks

Initializes a new instance of the class.

See Also