c# - Removing the TaxonomyField in the Migration -


as have been creating own orchard module decided needed couple of taxonomies via alterpartdefinition method in contentdefinitionmanager(i've been following advanced orchard course on pluralsight) class. later decided didn't need 3 taxonomies , wish remove couple of them. below code how added them.

 public int updatefrom10()         {             contentdefinitionmanager.alterpartdefinition("exercisepart", builder =>             builder.withfield("category", lvl => lvl.oftype("taxonomyfield")             .withsetting("displayname", "category")             .withsetting("taxonomyfieldsettings.taxonomy", "category")             .withsetting("taxonomyfieldsettings.leavesonly", "false")             .withsetting("taxonomyfieldsettings.singlechoice", "false")             .withsetting("taxonomyfieldsettings.hint", "select category")             ));             return 11;         } 

how can achieve goal?

this course of access pluralsight https://app.pluralsight.com/library/courses/adv-orchard/table-of-contents

pretty simple

contentdefinitionmanager.alterpartdefinition("exercisepart", builder =>         builder.removefield("category")); 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -