Ejemplo n.º 1
0
        public IEnumerable <Document> GetDocuments()
        {
            var documentsEntities = _queryProcessor.GetDocuments();

            if (documentsEntities != null)
            {
                var documentsList = new List <Document>();
                foreach (var entity in documentsEntities)
                {
                    documentsList.Add(ModelBinder.CreateDocumentModel(entity));
                }

                return(documentsList);
            }
            else
            {
                throw new RootObjectNotFoundException("Documents not found");
            }
        }