Getting stated - Desktop WPF .net Application

54 views
Skip to first unread message

Diego Garcia Vieira

unread,
Aug 22, 2014, 8:15:25 AM8/22/14
to mobile-c...@googlegroups.com
Hi,


I'm building a desktop application with WPF. I want to embed a database capable of replication with couchdb, aka couchbase lite .net.

Is there any tutorial to get started ?

Sherry Ummen

unread,
Aug 23, 2014, 12:59:49 PM8/23/14
to mobile-c...@googlegroups.com
HI Diego,

  If you are looking for Desktop app targeting .net 4.5 then you should look for this repository


You can pull and check out branch windows_target and then you can build by urself and try it out.

A very simple operation would be

Manager _cblManager = new Manager(new DirectoryInfo(@"C:\Database"), ManagerOptions.Default);


Database _database = _cblManager.GetDatabase(dbname);
 
var vals =  new Dictionary<String,Object> {
       
{ "text" , value },
       
{ "check" , false },
       
{ "created_at" , jsonDate }
   
};
var doc = _database .CreateDocument();

var result = doc.PutProperties (vals);
   
if (result == null)
       
throw new ApplicationException ("failed to save a new document");

Reply all
Reply to author
Forward
0 new messages