public ActionResult EditSlaveDocument(CouchIndexModel model)
        {
            var db = GetDatabase(slaveDatabase);

            var doc = new CouchJsonDocument(model.SlaveDocument);
            db.SaveDocument(doc);

            return this.RedirectToAction("Index");
        }
        public ActionResult Index()
        {
            var model = new CouchIndexModel();
            model.MasterDocument = String.Format(@"{{""_id"": ""{0}""}}", docId);
            model.SlaveDocument = string.Empty;
            model.Database1Name = masterDatabase;
            model.Database2Name = slaveDatabase;

            var masterDocument = GetDocument(masterDatabase);
            if (masterDocument != null)
                model.MasterDocument = masterDocument;

            var slaveDocument = GetDocument(slaveDatabase);
            if (slaveDocument != null)
                model.SlaveDocument = slaveDocument;

            model.MasterConflicts = GetConflicts(masterDatabase);
            model.SlaveConflicts = GetConflicts(slaveDatabase);

            return View(model);
        }
        public ActionResult ReplicateToSlave(CouchIndexModel model)
        {
            Replicate(masterDatabase, slaveDatabase);

            return this.RedirectToAction("Index");
        }