Table of Contents

Interface IApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>

Namespace
Apizr.Optional.Cruding.Sending
Assembly
Apizr.Integrations.Optional.dll

IApizrCrudOptionalMediator but dedicated to TApiEntity cruding with optional result, getting all shorter

public interface IApizrCrudOptionalMediator<TApiEntity, in TApiEntityKey, TReadAllResult, in TReadAllParams> : IApizrCrudOptionalMediatorBase, IApizrCrudMediatorBase, IApizrOptionalMediatorBase, IApizrMediatorBase where TApiEntity : class

Type Parameters

TApiEntity
TApiEntityKey
TReadAllResult
TReadAllParams

Methods

SendCreateOptionalCommand(TApiEntity, Action<IApizrRequestOptionsBuilder>)

Send a CreateOptionalCommand<TModelData> to Apizr using MediatR and returning an optional result

Task<Option<TApiEntity, ApizrException>> SendCreateOptionalCommand(TApiEntity payload, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

payload TApiEntity

The entity to create

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TApiEntity, ApizrException>>

SendCreateOptionalCommand<TModelEntity>(TModelEntity, Action<IApizrRequestOptionsBuilder>)

Send a mapped CreateCommand<TModelData> to Apizr using MediatR and returning a mapped optional result

Task<Option<TModelEntity, ApizrException>> SendCreateOptionalCommand<TModelEntity>(TModelEntity payload, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

payload TModelEntity

The entity to create

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TModelEntity, ApizrException>>

Type Parameters

TModelEntity

SendDeleteOptionalCommand(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)

Send a DeleteCommand<T, TKey> to Apizr using MediatR and returning an optional result

Task<Option<Unit, ApizrException>> SendDeleteOptionalCommand(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

key TApiEntityKey

The entity key

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<Unit, ApizrException>>

SendReadAllOptionalQuery(Action<IApizrRequestOptionsBuilder>)

Send a ReadAllQuery<TReadAllResult> to Apizr using MediatR and returning an optional result

Task<Option<TReadAllResult, ApizrException<TReadAllResult>>> SendReadAllOptionalQuery(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TReadAllResult, ApizrException<TReadAllResult>>>

SendReadAllOptionalQuery(TReadAllParams, Action<IApizrRequestOptionsBuilder>)

Send a ReadAllQuery<TReadAllResult> to Apizr using MediatR and returning an optional result

Task<Option<TReadAllResult, ApizrException<TReadAllResult>>> SendReadAllOptionalQuery(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

readAllParams TReadAllParams

The read all filters

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TReadAllResult, ApizrException<TReadAllResult>>>

SendReadAllOptionalQuery<TModelEntityReadAllResult>(Action<IApizrRequestOptionsBuilder>)

Send a mapped ReadAllQuery<TReadAllResult> to Apizr using MediatR and returning mapped optional result

Task<Option<TModelEntityReadAllResult, ApizrException<TModelEntityReadAllResult>>> SendReadAllOptionalQuery<TModelEntityReadAllResult>(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TModelEntityReadAllResult, ApizrException<TModelEntityReadAllResult>>>

Type Parameters

TModelEntityReadAllResult

The mapped result

SendReadAllOptionalQuery<TModelEntityReadAllResult>(TReadAllParams, Action<IApizrRequestOptionsBuilder>)

Send a mapped ReadAllQuery<TReadAllResult> to Apizr using MediatR and returning a mapped optional result

Task<Option<TModelEntityReadAllResult, ApizrException<TModelEntityReadAllResult>>> SendReadAllOptionalQuery<TModelEntityReadAllResult>(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

readAllParams TReadAllParams

The read all filters

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TModelEntityReadAllResult, ApizrException<TModelEntityReadAllResult>>>

Type Parameters

TModelEntityReadAllResult

SendReadOptionalQuery(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)

Send a ReadQuery<TResultData, TKey> to Apizr using MediatR and returning an optional result

Task<Option<TApiEntity, ApizrException<TApiEntity>>> SendReadOptionalQuery(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

key TApiEntityKey

The entity key

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TApiEntity, ApizrException<TApiEntity>>>

SendReadOptionalQuery<TModelEntity>(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)

Send a ReadQuery<TResultData, TKey> to Apizr using MediatR and returning a mapped optional result

Task<Option<TModelEntity, ApizrException<TModelEntity>>> SendReadOptionalQuery<TModelEntity>(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

key TApiEntityKey

The entity key

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<TModelEntity, ApizrException<TModelEntity>>>

Type Parameters

TModelEntity

SendUpdateOptionalCommand(TApiEntityKey, TApiEntity, Action<IApizrRequestOptionsBuilder>)

Send a UpdateCommand<TKey, TRequestData> to Apizr using MediatR and returning an optional result

Task<Option<Unit, ApizrException>> SendUpdateOptionalCommand(TApiEntityKey key, TApiEntity payload, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

key TApiEntityKey

The entity key

payload TApiEntity

The entity to update

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<Unit, ApizrException>>

SendUpdateOptionalCommand<TModelEntity>(TApiEntityKey, TModelEntity, Action<IApizrRequestOptionsBuilder>)

Send a mapped UpdateCommand<TKey, TRequestData> to Apizr using MediatR and returning an optional result

Task<Option<Unit, ApizrException>> SendUpdateOptionalCommand<TModelEntity>(TApiEntityKey key, TModelEntity payload, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)

Parameters

key TApiEntityKey

The entity key

payload TModelEntity

The entity to update

optionsBuilder Action<IApizrRequestOptionsBuilder>

Options provided to the request

Returns

Task<Option<Unit, ApizrException>>

Type Parameters

TModelEntity