(you can remove the download now)
Indeed, the object model is different in v3+. Please see the LLBLGen Pro v4.2 designer / algorithmia assemblies reference manual, which contains the documentation on the object model in the designer. Also take a look at the SDK here: http://www.llblgen.com/documentation/4.2/SDK/hh_start.htm for template specific details. We added helper logic for .lpt templates in the GeneratorUtils class, you can see how they work in the shipped .lpt templates for e.g. EF, Linq to Sql and NHibernate.
You are facing a tough job though. The issue is that the templates are likely covering functionality that's built into the designer/runtime now so you don't have to port that as it likely is redundant. E.g. the .xml file in your templates is bad. I don't know who wrote this, but it's not how we intended the system should be used as it's totally unmaintainable: it requires that the .xml file is updated as well as the normal model, which is of course not OK.
The designer nowadays can generate attributes with rules on entities out of the box, you don't need an xml file with a contact. Besides, every entity already has an object ID which is a guid in the object model, so you don't need that file anymore.
Best way to deal with what you're facing is:
- look at the functionality that's been generated extra with the extra templates
- look whether the extra functionality isn't already in the framework or in the designer
- port over only what isn't in the runtime/designer, and try to use the reference manuals and SDK as starting point.
For the .lpt templates:
The object model in v4 is a graph, everything is in the Project object which contains EntityModel (which is a nondirected graph with entities as vertices and relationships as edges), MetaData which is the database data and MappingData which is the mapping container. Most of this can be utilized using generatorutils (which is in GeneratorCore), see e.g. the linq to sql templates which are easy to start with: you can quickly see how to obtain relationships, entities, fields etc. by looking at these templates.
You can view the object model inside the designer, by loading a project, right-click the project node in project explorer -> Run plugin -> project inspector. This opens a tab with the object model so you can view what's where.
To see what objects are returned by a piece of code targeting the object model, you can try it out in the Element Search: you can type any C# code there and see what objects are returned.
For the .template templates, these should be ported easily without much change.