Insert Data directly

Topics: Customizing Orchard
Aug 26, 2012 at 1:47 PM

I have an windows service which calls out to an external data source and pulls in new data that I'd like to display on a list page of my Orchard site. I'm testing by adding records to the database however they never display on the list page. What am I missing?

I'm using v1.4.2

insert into orchard_framework_contentitemrecord
(
ContentType_Id,
data
)
Values
(
8,
'<Data><MobCode><InviteCode>TESTING INSERT</InviteCode><ValidatedDate></ValidatedDate><MobName></MobName></MobCode></Data>'
)
 
--751
insert into Orchard_Framework_ContentItemVersionRecord
(
data,
number,
published,
latest,
contentitemrecord_Id
)
Values
(
'<Data><MobCode><InviteCode>TESTING INSERT</InviteCode><ValidatedDate></ValidatedDate><MobName></MobName></MobCode></Data>',
1,
1,
1,
751
)
Aug 27, 2012 at 2:15 AM

I would do this differently.  Inserting data directly can be a very fragile integration method.  Why not setup a controller that can accept requests from your service?  Then you can use the content manager to create your content.