Accessing Orchard content items from external App

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

Hi,

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 1: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 3: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 4: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.