Setting properties of content part before saving it to db

Topics: Customizing Orchard
Apr 3, 2012 at 12:15 PM
Edited Apr 3, 2012 at 12:16 PM

I have a requirement where I need to set the properties of a content part before saving it to database. The scenario is user enters a title in the text box and I need to use the ISlugService to get the friendly url name. But its not possible to have a constructor in the part for injecting the ISlugService. So where would I do this?

I have tried OnCreated handler but of no use as the Properties are not available yet.


Apr 4, 2012 at 3:23 AM

Do it from somewhere else than the part. The driver for example.