Shailesh Uke

Shailesh Uke

  • 965
  • 807
  • 17.2k

couchbase server not return id within record using c# code

May 11 2017 8:49 AM
when we get records from couchbase server using select query not get id of each record

my code below . what i am missing

var clientConfiguration = new ClientConfiguration();
clientConfiguration.Servers = new List<Uri> { new Uri("http://localhost:8091/pools/") };

List<string> objDocList = new List<string>();
Cluster Cluster = new Cluster(clientConfiguration);
var bucket = Cluster.OpenBucket();
var result = bucket.Query<dynamic>("select * from testbucket");


foreach (var row in result)
{

dynamic propJSON = JsonConvert.SerializeObject(row);

//propJSON not contain id

}

I want id for updating record