This project is read-only.

Accessing Orchard content items from external App

Topics: Customizing Orchard, Writing modules
Jan 9, 2012 at 2:48 PM


How is it possible to create a some kind of WebService which will allow 3-rd party applications to Add, Edit, Delete, Get Orchard content items.

The main question for me is how to create an instance of IRepository<T> in my WebService?


Thank you in Advance!

Jan 9, 2012 at 2:52 PM

Firstly, to edit content items you use IContentManager, not IRepository<T>.

Can't you just do this with simple MVC actions? See how Remote Blog Publishing works currently; it's a web service that allows a 3rd-party application to edit content items...

Jan 9, 2012 at 4:58 PM

Ok, Thanks for this hint. But Is there any easiest way to do this? Because 3-rd party system can only be connected via WCF service.

Jan 9, 2012 at 5:06 PM

You can get WCF services working in Orchard, I think there's some sort of ServiceRoute. Maybe someone else can answer in more detail, or you can just dig deeper in these forums, I'm sure it's been discussed numerous times.

Getting an IContentManager is normally as simple as injecting one in via your constructor but I'm not sure how it'll work with WCF services.