public ActionResult EditEntity(int id)
        {
            _entityService = new EntityServices(GetFileFromContext(_editormainfile));

            //XmlNode node = _entityService.GetEntity(id);
            return View(new EntityMashupViewModel { EntityId = id, EntityFieldXML = string.Empty });
        }
        public ActionResult SaveEntity(EntityMashupViewModel mashup)
        {
            _entityService = new EntityServices(GetFileFromContext(_editormainfile));

             var contenttosave = string.Format(@"<Entity Id=""{0}""><Fields>{1}</Fields></Entity>", mashup.EntityId, mashup.EntityFieldXML);
            _entityService.CreateEntity(contenttosave);
            return View("EditEntity", mashup);
        }
 public EditorController()
 {
     _entityService = new EntityServices();
     _projservice = new ProjectService();
 }