To add to your mental soup, we went further by creating a special template in the wiki that represented the pattern for retrieving data from the .NET entity model. This allows me to write the sync engine in .NET once and control what data gets retrieved using a wiki page.
So for a given entity in my DB (say a widget), I have two templates. The first is Template:Widget that gets placed on every page that represents a widget, and which has parameters for each piece of information I want to get from my DB.
The second is "Template:Widget (DB)", which contains what looks like a template (so it doesn't mess up the wiki), but the parameter references are really references to fields on the entity itself (e,g. { { {Description}}}, { { {CreatedTime}}}, { { {Aliases.Name}}}). The engine knows how to use reflection in C# to get the values of those fields and stuff them into the text of the wiki page as values of the template parameters, handling lists and nested fields. It works out very well. If I want to retrieve different data from the DB, I just change the DB template to pull other fields and stuff them into the right places in the page's template.
The DB template also has special control fields that tell the engine how to locate the correct wiki page given a DB identifier. The engine performs a Semantic MediaWiki ASK query to find all pages in list of categories with a list of property/value pairs. If no pages come back, the page is created. If one page comes back it is updated. If more than one page comes back it is an error.