Qite / Umbraco-Inception

A code first approach for Umbraco (7)
MIT License
26 stars 9 forks source link

ConvertToModel for IContent #10

Closed dprothero closed 9 years ago

dprothero commented 9 years ago

I'm attaching to the ContentService.Published event because I need to take some action after content is published. I'd like to work with the published items using my strongly typed models. However, in the ContentService.Published event, you are given a collection of IContent and the ConvertToModel extension method expects an IPublishedContent.

I'm thinking about writing another extension method that can take an IContent and do the same thing. Before I do so however, I have two questions:

1) Does this code already exist somewhere and I'm just not seeing it? 2) If not, and I write the code, is this something you'd like to see a Pull Request for?

Thanks!

dprothero commented 9 years ago

I ended up not needing this.