Interface IApizrCrudOptionalMediator<TApiEntity, TApiEntityKey, TReadAllResult, TReadAllParams>
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
TApiEntityTApiEntityKeyTReadAllResultTReadAllParams
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
payloadTApiEntityThe entity to create
optionsBuilderAction<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
payloadTModelEntityThe entity to create
optionsBuilderAction<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
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
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
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<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
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<Option<TModelEntityReadAllResult, ApizrException<TModelEntityReadAllResult>>>
Type Parameters
TModelEntityReadAllResultThe 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
readAllParamsTReadAllParamsThe read all filters
optionsBuilderAction<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
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
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
Task<Option<Unit, ApizrException>> SendUpdateOptionalCommand(TApiEntityKey key, TApiEntity payload, Action<IApizrRequestOptionsBuilder> optionsBuilder = null)
Parameters
keyTApiEntityKeyThe entity key
payloadTApiEntityThe entity to update
optionsBuilderAction<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
keyTApiEntityKeyThe entity key
payloadTModelEntityThe entity to update
optionsBuilderAction<IApizrRequestOptionsBuilder>Options provided to the request
Returns
- Task<Option<Unit, ApizrException>>
Type Parameters
TModelEntity