Developer forum

Forum » Development » Codefirst item questions

Codefirst item questions

Casper Andersen
Reply

Hello DynamicWeb

I have a couple of questions with regards to the creating codefirst items.

I have followed some example i have found online and so on, but there are some things i just cant figure out:

 

1. In the standard DynamicWeb wrap Dwsimple, most of the item types inherit from the itemType called Layout, i'm guessing the only way to inherit from that via codefirst is to adde Layout in the class inheritance instead of ItemEntry, but Layout is not available, so i'm guessing you would have to have it as a codefirst item to be able to use it, do you have that available for download somewhere, or is there another option?

2. To be able to use and itemtype in a dropdownlist you have to specify the items id in the OptionItem attribute called SourceId, where do i find the ID's of my item types?

3. I read in a couple of months old forum post where Nicolai commented that with the release of DynamicWeb 8.9 that some better documentation on both this and  the item repository would be made / released, has this been released and if so where can i find it ?

 

Regards Casper Andersen


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Casper

@1: Yes, you have to convert those items to code first if you want to follow that approach. We do not have codefirst items for those.

@2: It is the name of the field where the value is. See attached example for how to use the OptionItem attribute.

@3: I've attahed the example to this post. It has not been published yet.

BR Nicolai

Votes for this answer: 1
 
Casper Andersen
Reply

Thanks alot! Helped me understand a lot of it

 

You must be logged in to post in the forum