On Jul 21, 2015, at 3:40 PM, Julio Albuquerque <jcezar.al...@gmail.com> wrote:You can issue values without using Views? Only using db.CreateAllDocumentsQuery ()?
On Jul 21, 2015, at 3:58 PM, Julio Albuquerque <jcezar.al...@gmail.com> wrote:Okay, but what about values? That is, as I recover all the complete document?
I have to use database.GetDocument ("key")?
var query = db.CreateAllDocumentsQuery ();
query.AllDocsMode = AllDocsMode.AllDocs;
var rows = query.Run ();
List<Cadastro> Geral = new List<Cadastro> (rows.Count);
foreach (var row in rows) {
var doc = row.Document;
Geral.Add( new Cadastro() {
Nome = doc.GetProperty<string> ("nome"),
Razao = doc.GetProperty<string> ("razao"),
Cidade = doc.GetProperty<string> ("cidade"),
Bairro = doc.GetProperty<string> ("bairro"),
Logradouro = doc.GetProperty<string> ("logradouro")
});
}On Jul 22, 2015, at 7:05 AM, Julio Albuquerque <jcezar.al...@gmail.com> wrote:But the values have to read the properties one by one?
It does not have a way to return the entire document as a JSON?