Orchard CMS ContentManager.New<>() Specified Cast Was Invalid

Much of it is laid out in terms of the models etc. Also have the migrations all set up and my database now has the tables for my module.

I am encountering the following error when calling ContentManager.New<myPart> and would like some help please.

Error is this:

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back
Specified cast is not valid.
System.InvalidCastException: Specified cast is not valid.
at Orchard.ContentManagement.ContentCreateExtensions.New[T]
(IContentManager manager, String contentType)

Have you created the content type itself? You need a content type with your part attached. Look for AlterTypeDefinition calls in the code.

27 Eki 2013 18:54 tarihinde "darrenthebrit" <[email removed]> yazdı:

From: darrenthebrit

I am in the early stages of developing a new module.

Much of it is laid out in terms of the models etc. Also have the migrations all set up and my database now has the tables for my module.

I am encountering the following error when calling ContentManager.New<myPart> and would like some help please.

Error is this:

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back
Specified cast is not valid.
System.InvalidCastException: Specified cast is not valid.
at Orchard.ContentManagement.ContentCreateExtensions.New[T]
(IContentManager manager, String contentType)