仅用作个人笔记,如对他人有帮助最好,不喜勿喷。
1.Json格式对象
Public class ObjTest
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("Value")]
public string Value{ get; set; }}
}
2.新增和删除对象;
try
{var client = new CouchbaseClient();
//添加数据
for (int i = 0, j = 5; i < 5; i++, j--)
{
var newObjTest= new ObjTest
{
Name = "This's name.",
Value= "This's value',
};
//新增Json数据
var item = client.Cas(StoreMode.Add, ""