I have an existing sql database that I have successfully integrated into my orchard site. The tables and procs from this existing database live in the same sql database that orchard is using. I am doing CRUD operations against these tables via
an Orchard module which calls stored procedures. I am using System.Transactions.TransactionScopeOption.Suppress in order to make my database calls outside of NHib.
My issue is that I need to display data on the same page in the UI from both an Orchard table and from one of my custom tables. I can query the orchard table with the following sql in my proc, but this feels wrong, it feels like I am doing something
I am not supposed to with Orchard, and that I will cause myself pain during future upgrades. I only need to display data here, any updates to data both in my custom tables and orchard tables happen through the appropriate data layer (my custom procs
vs orchard module w/NHib).
Is this an appropriate way to handle this? Any alternatives?
from orchard_Orchard_Users_UserPartRecord userRecord
join orchard_Orchard_Framework_ContentItemVersionRecord contentItem
on contentItem.ContentItemRecord_id = userRecord.id