Ejemplo n.º 1
0
        public string Translate(ComplexQuery query)
        {
            var fieldTransformations = new List <FieldTransformation>
            {
                new FieldTransformation("id", "identifier", (v) => {
                    return(_projectId.ToKotoriDocumentUri(_documentType, _documentTypeId, v, _index).ToString());
                }),
                new FieldTransformation("projectId", null, (v) => {
                    return(_projectId.ToKotoriProjectUri().ToString());
                }),
                new FieldTransformation("documentTypeId", null, (v) => {
                    return(_projectId.ToKotoriDocumentTypeUri(_documentType, _documentTypeId).ToString());
                })
            };

            var additionalQueryClause = "projectId eq '' and documentTypeId eq ''";

            return(BaseTranslator.Translate(query, Document.Entity, fieldTransformations, additionalQueryClause));
        }
Ejemplo n.º 2
0
 public string Translate(ComplexQuery query)
 {
     return(BaseTranslator.Translate(query, Project.Entity, _fieldTransformations, null));
 }