Could we use simple SQL in LLBLGen?

Posts   
 
    
nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 05-Oct-2011 05:08:46   

Hello

for example, the simple query sql is : select a,b,c from table.

some method like this:

DataTable dt = dao.ExecuteSQLAsDataTable(sql);

is there such way in LLbgen pro?

THank you

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-Oct-2011 05:40:07   

Hi nevernet,

We encourage people to not execute raw queries unless is really necessary. If the tables you are interested where mapped your LLBLGen project then you could use a Entity Fetch, or if you wan to make joins and combine the final projection with multiple entities you can use TypedViews, TypedViews or DynamicList.

If you still to execute a retrieval raw sql you can use a RetrievalQuery. Please check these related threads: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=9173&StartAtMessage=0&#51050 http://llblgen.com/tinyforum/Messages.aspx?ThreadID=12293&StartAtMessage=0&#68261

David Elizondo | LLBLGen Support Team
nevernet
User
Posts: 67
Joined: 01-Feb-2010
# Posted on: 05-Oct-2011 07:51:18   

Hi, Daelmo

Thanks for you reply, i know its rules, in this case it's special thing.