0

I have the following DB structure

Table1( ID1,Col1,Col2) and Table1( ID2,Col3,Col4)

Table1 and Table2 are separate table and don't have any relationships between them.

and I would like to achieve the following result

SELECT * FROM Table1 JOIN Table2 ON Table1.Col1= Table2.Col3

How could I achieve that using LLBL Gen Adapter.

Thanks.

Toan Nguyen
  • 11,263
  • 5
  • 43
  • 59

1 Answers1

2

Is there any specific reason you're not using the LINQ statements?

Otherise that would make it easy:

Linq to LLBLGen Pro: http://www.llblgen.com/documentation/3.1/LLBLGen%20Pro%20RTF/hh_start.htm

http://www.llblgen.com/documentation/3.1/LLBLGen%20Pro%20RTF/Tutorials%20and%20examples/examples_howdoi.htm#linq

Other options:

  • Define model-only relations in the LLBLGen Pro UI (since 3.0 only if the DB types + lengths match exactly unfortunately)
  • Have a look at instantiating a EntityRelation (however due to LINQ my Predicate skills are getting a bit rusty)
Wiebe Tijsma
  • 10,173
  • 5
  • 52
  • 68
  • We have been using LLBL Adapter for quite long time, so that's why we don't use LLBL LINQ. – Toan Nguyen Feb 13 '12 at 22:49
  • OK... Which version of LLBLGen Pro are you using? My first choice would be to create a model-only relation in the designer, does that make sense or do you need more info? – Wiebe Tijsma Feb 14 '12 at 15:06
  • The reason is that I can't create a new relationship using the designer as the entities have been generated. – Toan Nguyen Feb 17 '12 at 13:34
  • You don't have the designer at all? LLBLGen Pro is really meant to work together with the designer for any kind of changes to the entities, this means you can't make any database changes at all? Have you explored the last option (EntityRelation) I mentioned in the answer? But in any way I'd advise you to download the designer (at least a trial) to see if you can use that to add the relation in the UI and regenerate the entities. – Wiebe Tijsma Feb 19 '12 at 15:18
  • Thanks for your updated information. I have but I cannot create a new relation using the designer. Anyway I have found the solution – Toan Nguyen Feb 21 '12 at 23:38