public AsyncGetDecorator(IAsyncGetOperator <TEntity, TId, TInput> getOperator)
        {
            if (getOperator == null)
            {
                throw new ArgumentNullException(nameof(getOperator));
            }

            GetOperator = getOperator;
        }
        public async Task <IActionResult> Get([FromServices] IAsyncGetOperator <Person, GetPersonInput> op, int id, [FromQuery] string fields)
        {
            try
            {
                var result = await op.GetAsync(id);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.ToString());
                throw;
            }
        }
 public AsyncGetPreprocessingDecorator(IAsyncGetOperator <TEntity> getOperator, IAsyncGetPreprocessor <TEntity> preprocessor) : base(getOperator, preprocessor)
 {
 }
 public CrudOperatorCollection(IAsyncGetOperator <TEntity, GetInput <TEntity> > asyncGetOperator, IAsyncQueryOperator <TEntity, QueryInput <TEntity> > asyncQueryOperator, IAsyncAddOperator <TEntity> asyncAddOperator, IAsyncUpdateOperator <TEntity> asyncUpdateOperator, IAsyncDeleteOperator <TEntity> asyncDeleteOperator) : base(asyncGetOperator, asyncQueryOperator, asyncAddOperator, asyncUpdateOperator, asyncDeleteOperator)
 {
 }
Ejemplo n.º 5
0
 public AsyncGetPostprocessingDecorator(IAsyncGetOperator <TEntity> getOperator, IGetPostprocessor <TEntity> postprocessor) : base(getOperator, postprocessor)
 {
 }