Class ApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
Apizr mediator dedicated to cruding and with optional result
public class ApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams> : IApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>, IApizrCrudOptionalMediatorBase, IApizrCrudMediatorBase, IApizrOptionalMediatorBase, IApizrMediatorBase where TApiEntity : class
Type Parameters
TApiEntityTApiEntityKeyTReadAllResultTReadAllParams
- Inheritance
-
ApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
- Implements
-
IApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
- Inherited Members
Constructors
ApizrCrudOptionalMediator(IApizrCrudOptionalMediator)
public ApizrCrudOptionalMediator(IApizrCrudOptionalMediator apizrMediator)
Parameters
apizrMediatorIApizrCrudOptionalMediator
Methods
SendCreateOptionalCommand(TApiEntity, Action<IApizrRequestOptionsBuilder>)
Send a CreateOptionalCommand<TModelData> to Apizr using MediatR and returning an optional result
public Task<Option<TApiEntity, ApizrException>> SendCreateOptionalCommand(TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
entityTApiEntityoptionsBuilderAction<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
public Task<Option<TModelEntity, ApizrException>> SendCreateOptionalCommand<TModelEntity>(TModelEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
entityTModelEntityoptionsBuilderAction<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
public Task<Option<Unit, ApizrException>> SendDeleteOptionalCommand(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<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
public Task<Option<TReadAllResult, ApizrException<TReadAllResult>>> SendReadAllOptionalQuery(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
optionsBuilderAction<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
public Task<Option<TReadAllResult, ApizrException<TReadAllResult>>> SendReadAllOptionalQuery(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<Option<TReadAllResult, ApizrException<TReadAllResult>>>
SendReadAllOptionalQuery<TModelReadAllResult>(Action<IApizrRequestOptionsBuilder>)
Send a mapped ReadAllQuery<TReadAllResult> to Apizr using MediatR and returning mapped optional result
public Task<Option<TModelReadAllResult, ApizrException<TModelReadAllResult>>> SendReadAllOptionalQuery<TModelReadAllResult>(Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<Option<TModelReadAllResult, ApizrException<TModelReadAllResult>>>
Type Parameters
TModelReadAllResult
SendReadAllOptionalQuery<TModelReadAllResult>(TReadAllParams, Action<IApizrRequestOptionsBuilder>)
Send a mapped ReadAllQuery<TReadAllResult> to Apizr using MediatR and returning a mapped optional result
public Task<Option<TModelReadAllResult, ApizrException<TModelReadAllResult>>> SendReadAllOptionalQuery<TModelReadAllResult>(TReadAllParams readAllParams, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<Option<TModelReadAllResult, ApizrException<TModelReadAllResult>>>
Type Parameters
TModelReadAllResult
SendReadOptionalQuery(TApiEntityKey, Action<IApizrRequestOptionsBuilder>)
Send a ReadQuery<TResultData, TKey> to Apizr using MediatR and returning an optional result
public Task<Option<TApiEntity, ApizrException<TApiEntity>>> SendReadOptionalQuery(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<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
public Task<Option<TModelEntity, ApizrException<TModelEntity>>> SendReadOptionalQuery<TModelEntity>(TApiEntityKey key, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
optionsBuilderAction<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
public Task<Option<Unit, ApizrException>> SendUpdateOptionalCommand(TApiEntityKey key, TApiEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
entityTApiEntityoptionsBuilderAction<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
public Task<Option<Unit, ApizrException>> SendUpdateOptionalCommand<TModelEntity>(TApiEntityKey key, TModelEntity entity, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
entityTModelEntityoptionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<Option<Unit, ApizrException>>
Type Parameters
TModelEntity