Creating Instances Of Content Types in Migration.cs

Topics: Customizing Orchard, General
Nov 3, 2015 at 1:46 PM

Is it possible to create an instance of a content type from inside of a migration.cs?

I want to add a Query as part of my migration, so it is available when my Module is installed. Im currently trying to create it by using the contentManager and calling Create
This is causing an System.Reflection.TargetInvocationException to be thrown.

I've looked at the following links and it does seem like it should be possible.

Does anyone have some advice?