I've created a code-first ItemType and now I'd like to create a paragraph template for it. Now I'd also like to use that object strongly typed in my template.
At the moment I'm inheriting from Dynamicweb.Rendering.ViewModelTemplate<ParagraphViewModel>. I can use methods like Model.Item.GetString to get content from my item, but I'd really like to use the item object itself.
It's possible to use var item = ItemManager.Storage.GetById<ExampleItem>(Model.ItemId); to get my item, but it's probably a bad idea to query the item in my template, especially since it's already available in the ParagraphViewModel. There is the method ToCodeFirstItem in the ItemEntry class, but I don't seem to have access to that method via the ParagraphViewModel.