Skip to content

SaveRequestHandlerAsync<TRow,TSaveRequest,TSaveResponse> class

namespace: Serenity.Services   assembly: Serenity.Net.Services

Generic base class for asynchronous save request handlers

public class SaveRequestHandlerAsync<TRow, TSaveRequest, TSaveResponse> : 
    SaveRequestHandlerBase<TRow, TSaveRequest, TSaveResponse>, 
    ISaveHandlerAsync<TRow, TSaveRequest, TSaveResponse>, ISaveRequestProcessorAsync
    where TRow : class, IRow, IIdRow, new()
    where TSaveRequest : SaveRequest<TRow>, new()
    where TSaveResponse : SaveResponse, new()
parameter description
TRow Entity type
TSaveRequest Save request type
TSaveResponse Save response type

Public Members

name description
SaveRequestHandlerAsync(…) Initializes a new instance of the class.
CreateAsync(…)
ProcessAsync(…) Processes the save request asynchronously. This is the entry point for the handler.
UpdateAsync(…)

Protected Members

name description
behaviors Lazy list of behaviors that is activated for this request.
virtual AfterSaveAsync(…) Called after executing the insert/update statement
virtual BeforeSaveAsync(…) Called before executing the insert/update statement
virtual ExecuteSaveAsync(…) Executes the actual SQL save operation
virtual HandleDisplayOrderAsync(…) Handles display order field calculation before and after save
virtual InvokeSaveActionAsync(…) Invokes the passed save action method
virtual LoadOldEntityAsync(…) Loads the old entity for an update operation
virtual OnReturnAsync(…) Called just before the response is returned
virtual PerformAuditingAsync(…) Performs auditing
virtual PrepareQueryAsync(…) Prepares the query for selecting old record in an update operation.
virtual SetInternalFieldsAsync(…) Sets values for internal fields
virtual ValidateFieldValueAsync(…) Checks the value of a field by a validation rule asynchronously, see CancellationToken).
virtual ValidateFieldValuesAsync(…) Validates the values of the assigned fields by the validation rules of their properties, like ValidateFieldValues, awaiting the rules that can be checked asynchronously, see IAsyncValidationRule.
virtual ValidateFormAsync(…) Validates the row by a form, i.e. by what the form checks in the browser that the row doesn't, see FormValidationAttribute, awaiting the rules that can be checked asynchronously. It is called for the form of GetValidationForm, and can be called for others.
virtual ValidateRequestAsync(…) Validates the request by checking insert / update permissions.

See Also