Using Umbraco 5.1 API, I am able to create a new content type (for creating content nodes under content tab) using the below code.
// create content type
var typeBuilder = context.Hive.Cms().NewContentType("testType", "Test Type")
.Define("value", "contentPicker", "Content")
.Commit();
// create content node
var packageNode = context.Hive.Cms().NewRevision(packageNodeName, packageNodeName, "testType");
packageNode.SetUploadedFile("value", postedFile);
packageNode.Publish();
packageNode.Commit();
But is there a way to create media node using fluent API? I need to create a new custom media node with a custom type in the media tab tree. I have tried the below approaches, but none of them seem to work
1) context.Hive.Cms().NewRevision();
2) context.Hive.Cms<IMediaStore>().NewRevision();
3) builderStep.NewRevision<Media, IMediaStore>();
4) builderStep.NewRevision<TypedEntity, IMediaStore>();