How To Use ExampleQueries Projects

Posts   
 
    
superska avatar
superska
User
Posts: 37
Joined: 11-Nov-2013
# Posted on: 15-Nov-2013 15:35:33   

Hi,

I just purchased LLBLGen Pro Plus today, and liked to start exploring the samples in ExampleQueries, as they are referenced in the documentation. But the projects don't seem to build. They're referencing DLL's that don't exsist in 4.1 and are using classes in namespaces like AdventureWorks.Dal.Adapter, which I can't find either.

Wouldn't it be great if there were a few solutions that would open and run right from the install?

If it's just because I'm doing something wrong, please help :-)

Thanks!

Stefan Kamphuis

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 15-Nov-2013 16:30:01   

Ah, a small issue. We released v4.1 yesterday and I think we forgot to update the example query projects to v4.1 (so they're referencing v4.0 assemblies)

The generated code projects can be created from the included llblgenproj files. (we didn't include the generated code just the projects to create them manually). The included example queries are a selection from our unit tests, and results can differ from running them on vanilla northwind for example.

Though it's best to start with the examples on our github repo: https://github.com/SolutionsDesign/LLBLGenProExamples_4.x

They come with generated code, all you need to do is either create the DB with data with the included script or point the connection string to an already setup database.

Frans Bouma | Lead developer LLBLGen Pro
superska avatar
superska
User
Posts: 37
Joined: 11-Nov-2013
# Posted on: 15-Nov-2013 16:49:48   

Not that small, because they seem to be referencing pre-4 assemblies. But since the github samples look to be exactly what I'm looking for, forget I mentioned it :-)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 15-Nov-2013 17:20:26   

superska wrote:

Not that small, because they seem to be referencing pre-4 assemblies. But since the github samples look to be exactly what I'm looking for, forget I mentioned it :-)

now that I checked it, indeed! flushed . The thing is, these queries were added to show what you can do, not as a starting point or 'build this, run it', but it's not a great way to start things, so we'll add a .cmd file which will generate the projects for you using the cli generator and a readme so things are less confusing. Problem is that the stuff is likely installed in the programs folder so generating stuff there is a bit of a problem. We'll see what we can do simple_smile

Frans Bouma | Lead developer LLBLGen Pro
superska avatar
superska
User
Posts: 37
Joined: 11-Nov-2013
# Posted on: 15-Nov-2013 19:10:28   

You're of course right about the Program Files folder. What I liked about the ExampleQueries, is exactly what you say: it shows what you can do. So I can see that, even without running it. But still it would be nice to have it compile :-).

What I like about the github examples project, is that I set it up in 10 minutes and had it ruinning in the debugger.

Maybe it would be nice to have forms/services using different query techniques in there?

Thanks! Stefan

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 16-Nov-2013 10:33:14   

superska wrote:

You're of course right about the Program Files folder. What I liked about the ExampleQueries, is exactly what you say: it shows what you can do. So I can see that, even without running it. But still it would be nice to have it compile :-).

Yes, agreed.

What I like about the github examples project, is that I set it up in 10 minutes and had it ruinning in the debugger.

Maybe it would be nice to have forms/services using different query techniques in there?

You mean, show the same query in linq, queryspec and low-level api?

Frans Bouma | Lead developer LLBLGen Pro
superska avatar
superska
User
Posts: 37
Joined: 11-Nov-2013
# Posted on: 17-Nov-2013 15:11:40   

Otis wrote:

You mean, show the same query in linq, queryspec and low-level api?

Yes, that would be a great aid in figuring out which approach to choose, I think.

Greetz, Stefan

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 17-Nov-2013 15:49:25   

superska wrote:

Otis wrote:

You mean, show the same query in linq, queryspec and low-level api?

Yes, that would be a great aid in figuring out which approach to choose, I think.

Greetz, Stefan

We mainly provide queryspec queries, because linq queries are the same as in the general microsoft docs for linq and linq to objects. Our low-level API for fetching is still there of course but we recommend using either linq or queryspec for fetching, as they provide easier interfaces and are more powerful with less code.

The queryspec example queries (Which didn't run for you) all come with the equivalent linq query in comments. In general people choose one api they are either familiar with (e.g. linq) or they find easier to use (linq or queryspec). Linq is somewhat less verbose, but queryspec is more predictable and if you're a sql oriented person it's easier to convert a query from sql to queryspec than to linq.

Frans Bouma | Lead developer LLBLGen Pro
superska avatar
superska
User
Posts: 37
Joined: 11-Nov-2013
# Posted on: 19-Nov-2013 16:28:44   

Otis wrote:

The queryspec example queries (Which didn't run for you) all come with the equivalent linq query in comments. In general people choose one api they are either familiar with (e.g. linq) or they find easier to use (linq or queryspec). Linq is somewhat less verbose, but queryspec is more predictable and if you're a sql oriented person it's easier to convert a query from sql to queryspec than to linq.

I see. That's a very acceptable solution if you ask me, to have in the Github examples project eventually.

Thanks!