Table of Contents

Class ApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>

Namespace
Apizr.Mediation.Cruding.Sending
Assembly
Apizr.Integrations.MediatR.dll

Apizr mediator dedicated to cruding

public class ApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams> : IApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>, IApizrCrudMediatorBase, IApizrMediatorBase where TApiEntity : class

Type Parameters

TApiEntity
TApiEntityKey
TReadAllResult
TReadAllParams
Inheritance
ApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
Implements
IApizrCrudMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
Inherited Members

Constructors

ApizrCrudMediator(IApizrCrudMediator)

public ApizrCrudMediator(IApizrCrudMediator apizrMediator)

Parameters

apizrMediator IApizrCrudMediator

Methods

SendCreateCommand(TApiEntity, Action<IApizrRequestOptionsBuilder>)

Send a CreateCommand<TModelData> to Apizr using MediatR

public Task<TApiEntity> SendCreateCommand(TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

entity TApiEntity

The entity to create

optionsBuilder Action<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

entity TModelEntity

The entity to create

optionsBuilder Action<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

key TApiEntityKey

The entity key

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task

SendReadAllQuery(Action<IApizrRequestOptionsBuilder>)

Send a ReadAllQuery<TReadAllResult> to Apizr using MediatR

public Task<TReadAllResult> SendReadAllQuery(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

optionsBuilder Action<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

readAllParams TReadAllParams

The read all filters

optionsBuilder Action<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

optionsBuilder Action<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

readAllParams TReadAllParams

The read all filters

optionsBuilder Action<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

key TApiEntityKey

The entity key

optionsBuilder Action<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

key TApiEntityKey

The entity key

optionsBuilder Action<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

entity TApiEntity

The entity to create

optionsBuilder Action<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

entity TModelEntity

The entity to create

optionsBuilder Action<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

key TApiEntityKey

The entity key

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<IApizrResponse>

SendSafeReadAllQuery(Action<IApizrRequestOptionsBuilder>)

Send a SafeReadAllQuery<TReadAllResult> to Apizr using MediatR

public Task<IApizrResponse<TReadAllResult>> SendSafeReadAllQuery(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

optionsBuilder Action<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

readAllParams TReadAllParams

The read all filters

optionsBuilder Action<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

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<IApizrResponse<TModelEntityReadAllResult>>

Type Parameters

TModelEntityReadAllResult

The 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

readAllParams TReadAllParams

The read all filters

optionsBuilder Action<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

key TApiEntityKey

The entity key

optionsBuilder Action<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

key TApiEntityKey

The entity key

optionsBuilder Action<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

key TApiEntityKey

The entity key

entity TApiEntity

The entity to update

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<IApizrResponse>

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

key TApiEntityKey

The entity key

entity TModelEntity

The entity to update

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<IApizrResponse>

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

key TApiEntityKey

The entity key

entity TApiEntity

The entity to update

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task

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

key TApiEntityKey

The entity key

entity TModelEntity

The entity to update

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task

Type Parameters

TModelEntity