Error GetView in C# .NET beer-sample


#1

Follow Example at https://github.com/couchbaselabs/docs-ng/blob/master/content/couchbase-sdk-net-1.3/couchbase-and-asp-net-mvc.markdown :

I have a View: beer/by_country of beer-sample bucket:
Map:

function (doc, meta) {
  if (doc.country && doc.state && doc.city && doc.code) {
     emit([doc.country, doc.state, doc.city, doc.code], null);
  }
}

Reduce use built-in function: _count
In .NET, I get View by

var view = client.GetView("beer", "by_country").Group(true).GroupAt(3);

But I get error:
- Error converting value 1 to type ‘Couchbase.IViewRow’. Path ‘’, line 1, position 1.

Show me where i’m wrong?

See from: http://localhost:8092/beer-sample/_design/beer/_view/by_country?group=true&group_level=3&stale=update_after&connection_timeout=60000&limit=10&skip=0

{"rows":[
{"key":["Argentina","Buenos Aires","San Martin"],"value":1},
{"key":["Australia","NSW","Picton"],"value":1},
{"key":["Australia","Victoria","Little River"],"value":1},
{"key":["Australia","WA","Fremantle"],"value":1},
{"key":["Belgium","Brabant","Steenhuffel"],"value":1},
{"key":["Belgium","Hainaut","Brunehaut"],"value":1},
{"key":["Belgium","West-Vlaanderen","Brugge"],"value":1},
{"key":["Belgium","West-Vlaanderen","Esen"],"value":1},
{"key":["Canada","Alberta","Calgary"],"value":2},
{"key":["Canada","British Columbia","Burnaby"],"value":1}
]
}

#2

Sonrobby -

Do you get that error when the iterating the results of the view object? The code provided seems to be missing something based upon the error you are reporting.

-Jeff