public Contact this[string id] { get { var doc = _couch.GetDocument(_db, id); LitJson.JsonMapper.RegisterImporter <string, Guid>((s) => { return(Guid.Parse(s)); }); return(LitJson.JsonMapper.ToObject <Contact>(doc)); } set { if (this[id]._rev == value._rev && id == value._id) { Add(value); } else { throw new HttpResponseException(HttpStatusCode.Conflict); } } }
public string GetView(string id) { return(_couch.GetDocument(_db, "/_design/" + id)); }