More on Manager Templates

Posts   
 
    
Waldo
User
Posts: 9
Joined: 15-Feb-2006
# Posted on: 08-Mar-2006 07:47:49   

Hi Frans and users,

As per your instructions, I've downloaded the templates folder and these are now sitting in: C:\Program Files\Solutions Design\LLBLGen Pro\Drivers\SqlServer\Templates\C#

task performers: C:\Program Files\Solutions Design\LLBLGen Pro\TaskPerformers

template studio (exe) in: C:\Program Files\Solutions Design\LLBLGen Pro

I created a ManagerBase class without any difficulties using the ManagerBaseTemplate, guided by instructions from http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=2327 for all of my entities. No problems also using the PrefetchPathElementCollection template.

I then proceeded to create base classes for my entities using the EnityManagerBaseTemplate and I get the following error:

"Object reference not set to an instance of an object"

-----[Core exception]-------------------- at EntityManagerBaseTemplate.__ScriptCode() at EntityManagerBaseTemplate.___RUN(IGenerator executingGenerator, Hashtable parameters, StreamWriter outputWriter, Object activeObject) at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.Perform(IGenerator executingGenerator, ITask taskDefinition, Hashtable parameters) at SD.LLBLGen.Pro.GeneratorCore.Task.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.GeneratorCore.TaskGroup.Perform(IGenerator executingGenerator, LogNode parentNode) at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, Project projectDefinition, TemplateSetDefinition templateSet, ApplicationConfiguration configurationSettings) at SD.LLBLGen.Pro.Tools.TemplateEditor.MainForm.RunTasks(ITaskGroup tasksToRun, Project projectToUse)

Obviously, I'm going about this the wrong way.. confused , and as such I have a number of questions regarding the process:

1 EntityManager* classes inherit from the abstract class ManagerBaseTemplate. What is the purpose of EntityManagerTemplate? If I had two LLBLGenPro entities say Account and Order then I would (?) create an AccountOrderManagerBase class and an inherited class AccountOrderEntityManagerBase class to deal with operations that involve these two classes -- as discussed in the threads on the advantages of using a Manager model approach as oppose to the Domain model.

  1. Can someone briefly explain the purpose of PrefetchPathElementCollectionTemplate?

  2. Does the EntityManagerBaseTemplate return custom collections or do I need to code these in?

I've jumped into the deep end here & I've got a lot of reading to do to along the way...so any information provided to the questions above, will again be greatly appreciated flushed

Thanks again,

David

Waldo
User
Posts: 9
Joined: 15-Feb-2006
# Posted on: 09-Mar-2006 06:39:02   

This is sorted, thanks. I should have read first:

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=2133

Cheers, Waldo