Пример #1
0
        public ActionResult Update(AttributeMetaData attributeMetadata)
        {
            string entityName = Session["EntityName"].ToString();
            var    x          = new EntityMetaDataUtils();

            //update entity based on model information
            x.UpdateEntity(entityName, attributeMetadata);
            TempData["Message"] = "Successfully updated entity " + entityName;

            return(RedirectToAction("Update"));
        }
Пример #2
0
        public ActionResult Create(CustomEntityMetaData newEntityMetaData)
        {
            try
            {
                var x = new EntityMetaDataUtils();

                // Create New Entity Based on Model Data passed to method
                x.CreateEntity(newEntityMetaData);
                Session["EntityName"] = newEntityMetaData.EntityName;


                return(RedirectToAction("Update"));
            }
            catch (Exception ex)
            {
                TempData["Message"] = ex.Message;
                return(View());
            }
        }