问题
I'm hoping to rename an existing custom content type in one of my Orchard modules. Is it possible to do this in a migration?
回答1:
Yes, but not by using ContentDefinitionManager
. The simplest way would be to execute an SQL update query against Settings_ContentTypeDefinitionRecord
table using SchemaBuilder.ExecuteSql
.
来源:https://stackoverflow.com/questions/27956273/orchard-rename-content-type-in-migration