Command Line Interface and TypedViews

Posts   
 
    
Torsten
User
Posts: 26
Joined: 13-Mar-2015
# Posted on: 13-Mar-2015 14:30:00   

Hi there,

I didn't find any hints on that:

We are using DB First in LLBLGen 4.2 and we have written a command line tool to refresh the model. Therefore we start clirefresher and cligenerator with parameter.

Everything works fine accept generating new TypedViews. The stored procedures for that view where generated, but they didn't get mapped and so cannot be called in code.

I adjusted clirefresher engine in line 270 already, so the resultset is determined correctly.

Is it possible to generate these TypedViews automatically without changing the project file in gui??

Regards

Torsten

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Mar-2015 07:04:54   

Torsten wrote:

Everything works fine accept generating new TypedViews. The stored procedures for that view where generated, but they didn't get mapped and so cannot be called in code.

What exactly means "didn't get mapped"?

Torsten wrote:

I adjusted clirefresher engine in line 270 already, so the resultset is determined correctly.

Does this fixes your issue? What line is that?

Torsten wrote:

Is it possible to generate these TypedViews automatically without changing the project file in gui??

Please elaborate more on that. What you should change? I assume you mean: reverse engineer SP calls to TypedViews, which isn't automatically with clirefresher.

David Elizondo | LLBLGen Support Team
Torsten
User
Posts: 26
Joined: 13-Mar-2015
# Posted on: 16-Mar-2015 09:44:52   

Ok, let me try explain:

We have written a tool which makes some preferences depending on the selected environment (dev, test, prod ). This tool is also used instead of LLBLgen gui to generate the model.

Because we only want to use this tool, everything has to run automatically.

I adjusted the clirefresher, because otherwise the resultsets were only generated for stored procedures in project file. For this, I implemented in line 270 this


foreach (var newProcName in newContainer.StoredProcedureNames)
   {
          if (proceduresToProcess.Contains(newProcName.Name))
             {
                 newProcName.PerformPostProcessing = true;                              
             }
    }

"proceduresToProcess" is a list of strings, which will be filled with the stored procedures, we want to use in code and have resultsets.

If we write new procedures in the database, they were added to this list and the clirefresher determines the resultsets for these.

But now the next step doesn't work:

The task "SD.Tasks.Generic.TypedViewClassGenerator" should generate the TypedViewClasses for this procedure. If I stop the automatic process before cligenerator and open the projectfile in gui, there is no TypedView mapped. So I think, I have to implement another step to get the typed views for all new procedures.

If I work on the "template project" and add the procedure manually, everything works fine and the typed view is generated. But I don't want to change the template every time a new procedure is added.

Hope my indention is now more specific and you know a solution for this.

Thanks a lot for your help.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-Mar-2015 07:12:55   

AFIAK, the TypedView reverse engineer from SP Calls to TypedViews is not automatic, which means that you should do it yourself in the Designer.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 17-Mar-2015 14:08:33   

That's correct, also because they depend on the resultset layout of the proc, so you have to select the resultset then reverse engineer it to a typed view.

Keep in mind that the cli refresher is discontinued for v5.

Frans Bouma | Lead developer LLBLGen Pro