Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Low-level vs. QuerySpec
 

Pages: 1
LLBLGen Pro Runtime Framework
Low-level vs. QuerySpec
Page:1/1 

  Print all messages in this thread  
Poster Message
obzekt
User



Location:

Joined on:
29-Apr-2004 18:18:59
Posted:
49 posts
# Posted on: 22-Nov-2016 17:24:06.  
Hello. We have a relatively large and mature project built on the Self-Servicing model that we are about to migrate to Adapter in order to support multiple databases. We are wondering whether we should keep the low-level API that we're familiar with, or take the opportunity to switch to the more expressive and elegant QuerySpec or Linq. Since the latter APIs are built on top of low-level, we're afraid that there may be an overhead at runtime. What do you guys think?

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37869 posts
# Posted on: 23-Nov-2016 10:51:08.  
Linq has more overhead than queryspec, which overhead is minimal. You don't have to switch to a different query system however if you don't want to, the low level queries will keep on working with newer versions. Not having to migrate these could save you a lot of time. If you want to migrate to a newer query system, in general use what fits you best, where QuerySpec is recommended as it's the most flexible and closest to SQL.

To see the overhead of the query systems, see the non-change tracking individual fetch benchmarks of the different APIs in our benchmarks here: https://github.com/FransBouma/RawDataAccessBencher/blob/master/Results/2016-11-22.txt

There you can see that queryspec has a small overhead compared to raw SQL, but not as much as Linq. You can mix all query APIs in your application, you don't have to stick to one. If one query is easier formulated in Linq, and the other in queryspec, use both Regular Smiley


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
obzekt
User



Location:

Joined on:
29-Apr-2004 18:18:59
Posted:
49 posts
# Posted on: 23-Nov-2016 15:01:21.  
Thank you Frans. We'll then avoid Linq and focus more on QuerySpec. The migration can be done in stages.

We generated an adapter model, but we don't see the Where() method of the entities supposed to be exposed by QueryFactory. Must be missing sth obvious..
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37869 posts
# Posted on: 23-Nov-2016 15:25:33.  
Add to your code file:

using SD.LLBLGen.Pro.QuerySpec;
using SD.LLBLGen.Pro.QuerySpec.Adapter;

Regular Smiley


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
obzekt
User



Location:

Joined on:
29-Apr-2004 18:18:59
Posted:
49 posts
# Posted on: 23-Nov-2016 17:24:47.  
That did it. Thanks! Embarrassed
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.