I've composite Content Type "Forecast" which has link on another ContentType "Text"
generated c# class for "Forecast" content type has following code:
public IPublishedContent FText
{
get { return this.GetPropertyValue<IPublishedContent>("fText"); }
}
The goal is to create many forecasts and texts for them programmatically.
I've found that Umbraco provides developers with ContentService API for working with it's entities. To create new Text entities I use methods:
var t = ContentService.CreateContent(name, parentId, alias)
ContentService.SaveAndPublishWithStatus(t);
And I tried to use these methods to create Forecast entities, but I've got a problem because I can't assign Texts on Forecasts
Create composite content programmatically
I've composite Content Type "Forecast" which has link on another ContentType "Text"
generated c# class for "Forecast" content type has following code:
The goal is to create many forecasts and texts for them programmatically.
I've found that Umbraco provides developers with ContentService API for working with it's entities. To create new Text entities I use methods: var t = ContentService.CreateContent(name, parentId, alias) ContentService.SaveAndPublishWithStatus(t);
And I tried to use these methods to create Forecast entities, but I've got a problem because I can't assign Texts on Forecasts
Any ideas?
is working on a reply...