public AppFieldController() { DB = new AppFieldModelContext <AppFieldModel>(); ForeignKey = "AppId"; Form = new AppFieldForm(); CanDelete = true; ReturnTo = new ReturnTo(new AppController(), "Edit", "AppId", "Name", new string[] { "Create", "Edit", "Delete" }); TitlePlural = "App Fields"; SearchForms.Add(new AppFieldSearchForm(Url)); }
//private AppModelContext db = new AppModelContext(); public MenuController() { Form = new MenuForm(); CanDelete = true; TitlePlural = "Menus"; ForeignKey = "ParentId"; ReturnTo = new ReturnTo(this, "Edit", "ParentId", "Label", new string[] { "Delete" }); SearchForms.Add(new MenuSearchForm(Url)); }