Exemple #1
0
        public List <DocumentDto> GetDocuments()
        {
            var documents = _dbContext.GetAllQuery <Document>().ToList();

            return(documents
                   .Select(d =>
                           new DocumentDto()
            {
                Name = d.Name,
                Location = "/api/documents/" + d.DocumentId.ToString(),         // not enough information about Location
                FileSize = d.FileSize
            })
                   .ToList());
        }