Exemple #1
0
        public async Task <JsonResponse> ValuesAsync(JObject values)
        {
            var response = new JsonResponse(values);
            var columns  = _repository.Schema.GetColumns(_relationName, _schemaName).Where(q => !q.IsReadonly).ToImmutableArray();
            var handler  = BaseJsonHandler.Init(ref response, _repository, columns, MandatoryColumns.Required, _relationName, _schemaName)
                           .Next <GenericRequiredJsonValidatorHandler>()
                           .Next <GenericTypeJsonValidator>();
            await handler.NextAsync <InsertRequestHandler>();

            return(response);
        }
Exemple #2
0
        public JsonResponse One(JObject filter)
        {
            var response = new JsonResponse();

            BaseJsonHandler
            .Init(ref response, _repository)
            .Next <GenericRequiredJsonValidatorHandler>()
            .Next <GenericTypeJsonValidator>()
            .Next <FindOneJsonRequestHandler>();

            return(response);
        }