View Query in .NET SDK


I’m having a problem querying against a View using .NET sdk 2.0.3. I hadn’t any problem to insert data, but I couldn’t retrieve it.

I tryed make the query in the web console and It’s work, but in the code didn’t return anything.

The code is the following:

var query = bucket.CreateQuery("queries", "ById", false); var result = bucket.Query<dynamic>(query);

Any idea?


What does your map function look like? What about your data?


The map function is the next:

function (doc, meta) {
  if( === "2_RSA"){
emit([], null);

And the data is like this:

    'data': [[1, 2, 3, 4 ], [6, 7, 8]]

@spachecojimenez -

Have you published your view?

Once I published the view, I get:



Yes, I published the view and I have this code:

foreach (var row in result.Rows)

            File.WriteAllLines(@"C:\Users\sergio pacheco\Desktop\demo\demo.txt", lines);

Problem fixed.

It was something wrong with the dependencies of the project.

Thanks for the help.

1 Like