Class ApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
Apizr mediator dedicated to cruding
public class ApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams> : IApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>, IApizrCrudMediatorBase, IApizrMediatorBase where TApiEntity : class
Type Parameters
TApiEntityTApiEntityKeyTReadAllResultTReadAllParams
- Inheritance
-
ApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
- Implements
-
IApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
- Inherited Members
Constructors
ApizrCrudMediator(IApizrCrudMediator)
public ApizrCrudMediator(IApizrCrudMediator apizrMediator)
Parameters
apizrMediatorIApizrCrudMediator
Methods
SendCreateCommand(TApiEntity, Action<IApizrRequestOptionsBuilder>)
Send a CreateCommand<TModelData> to Apizr using MediatR
public Task<TApiEntity> SendCreateCommand(TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
entityTApiEntityThe entity to create
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TApiEntity>
SendCreateCommand<TModelEntity>(TModelEntity, Action<IApizrRequestOptionsBuilder>)
Send a mapped CreateCommand<TModelData> to Apizr using MediatR returning a mapped result
public Task<TModelEntity> SendCreateCommand<TModelEntity>(TModelEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
entityTModelEntityThe entity to create
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TModelEntity>
Type Parameters
TModelEntity
SendDeleteCommand(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a DeleteCommand<T, TKey> to Apizr using MediatR
public Task SendDeleteCommand(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
SendReadAllQuery(Action<IApizrRequestOptionsBuilder>)
Send a ReadAllQuery<TReadAllResult> to Apizr using MediatR
public Task<TReadAllResult> SendReadAllQuery(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TReadAllResult>
SendReadAllQuery(TReadAllParams, Action<IApizrRequestOptionsBuilder>)
Send a ReadAllQuery<TReadAllResult> to Apizr using MediatR
public Task<TReadAllResult> SendReadAllQuery(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TReadAllResult>
SendReadAllQuery<TModelReadAllResult>(Action<IApizrRequestOptionsBuilder>)
Send a mapped ReadAllQuery<TReadAllResult> to Apizr using MediatR returning mapped result
public Task<TModelReadAllResult> SendReadAllQuery<TModelReadAllResult>(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TModelReadAllResult>
Type Parameters
TModelReadAllResult
SendReadAllQuery<TModelReadAllResult>(TReadAllParams, Action<IApizrRequestOptionsBuilder>)
Send a mapped ReadAllQuery<TReadAllResult> to Apizr using MediatR returning a mapped result
public Task<TModelReadAllResult> SendReadAllQuery<TModelReadAllResult>(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TModelReadAllResult>
Type Parameters
TModelReadAllResult
SendReadQuery(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a ReadQuery<TResultData, TKey> to Apizr using MediatR
public Task<TApiEntity> SendReadQuery(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TApiEntity>
SendReadQuery<TModelEntity>(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a ReadQuery<TResultData, TKey> to Apizr using MediatR returning a mapped result
public Task<TModelEntity> SendReadQuery<TModelEntity>(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<TModelEntity>
Type Parameters
TModelEntity
SendSafeCreateCommand(TApiEntity, Action<IApizrRequestOptionsBuilder>)
Send a SafeCreateCommand<TModelData> to Apizr using MediatR
public Task<IApizrResponse<TApiEntity>> SendSafeCreateCommand(TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
entityTApiEntityThe entity to create
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TApiEntity>>
SendSafeCreateCommand<TModelEntity>(TModelEntity, Action<IApizrRequestOptionsBuilder>)
Send a mapped SafeCreateCommand<TModelData> to Apizr using MediatR returning a mapped result
public Task<IApizrResponse<TModelEntity>> SendSafeCreateCommand<TModelEntity>(TModelEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
entityTModelEntityThe entity to create
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TModelEntity>>
Type Parameters
TModelEntity
SendSafeDeleteCommand(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a SafeDeleteCommand<T, TKey> to Apizr using MediatR
public Task<IApizrResponse> SendSafeDeleteCommand(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
SendSafeReadAllQuery(Action<IApizrRequestOptionsBuilder>)
Send a SafeReadAllQuery<TReadAllResult> to Apizr using MediatR
public Task<IApizrResponse<TReadAllResult>> SendSafeReadAllQuery(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TReadAllResult>>
SendSafeReadAllQuery(TReadAllParams, Action<IApizrRequestOptionsBuilder>)
Send a SafeReadAllQuery<TReadAllResult> to Apizr using MediatR
public Task<IApizrResponse<TReadAllResult>> SendSafeReadAllQuery(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TReadAllResult>>
SendSafeReadAllQuery<TModelEntityReadAllResult>(Action<IApizrRequestOptionsBuilder>)
Send a mapped SafeReadAllQuery<TReadAllResult> to Apizr using MediatR returning mapped result
public Task<IApizrResponse<TModelEntityReadAllResult>> SendSafeReadAllQuery<TModelEntityReadAllResult>(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TModelEntityReadAllResult>>
Type Parameters
TModelEntityReadAllResultThe mapped result
SendSafeReadAllQuery<TModelEntityReadAllResult>(TReadAllParams, Action<IApizrRequestOptionsBuilder>)
Send a mapped SafeReadAllQuery<TReadAllResult> to Apizr using MediatR returning a mapped result
public Task<IApizrResponse<TModelEntityReadAllResult>> SendSafeReadAllQuery<TModelEntityReadAllResult>(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TModelEntityReadAllResult>>
Type Parameters
TModelEntityReadAllResult
SendSafeReadQuery(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a SafeReadQuery<TResultData, TKey> to Apizr using MediatR
public Task<IApizrResponse<TApiEntity>> SendSafeReadQuery(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TApiEntity>>
SendSafeReadQuery<TModelEntity>(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a SafeReadQuery<TResultData, TKey> to Apizr using MediatR returning a mapped result
public Task<IApizrResponse<TModelEntity>> SendSafeReadQuery<TModelEntity>(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<IApizrResponse<TModelEntity>>
Type Parameters
TModelEntity
SendSafeUpdateCommand(TApiEntityKey, TApiEntity, Action<IApizrRequestOptionsBuilder>)
Send a SafeUpdateCommand<TKey, TRequestData> to Apizr using MediatR
public Task<IApizrResponse> SendSafeUpdateCommand(TApiEntityKey key, TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
entityTApiEntityThe entity to update
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
SendSafeUpdateCommand<TModelEntity>(TApiEntityKey, TModelEntity, Action<IApizrRequestOptionsBuilder>)
Send a mapped SafeUpdateCommand<TKey, TRequestData> to Apizr using MediatR
public Task<IApizrResponse> SendSafeUpdateCommand<TModelEntity>(TApiEntityKey key, TModelEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
entityTModelEntityThe entity to update
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
Type Parameters
TModelEntity
SendUpdateCommand(TApiEntityKey, TApiEntity, Action<IApizrRequestOptionsBuilder>)
Send a UpdateCommand<TKey, TRequestData> to Apizr using MediatR
public Task SendUpdateCommand(TApiEntityKey key, TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
entityTApiEntityThe entity to update
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
SendUpdateCommand<TModelEntity>(TApiEntityKey, TModelEntity, Action<IApizrRequestOptionsBuilder>)
Send a mapped UpdateCommand<TKey, TRequestData> to Apizr using MediatR
public Task SendUpdateCommand<TModelEntity>(TApiEntityKey key, TModelEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
entityTModelEntityThe entity to update
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
Type Parameters
TModelEntity