Join on a Simple Record

18 views
Skip to first unread message

jon.sco...@cop.com

unread,
Dec 10, 2014, 4:20:07 PM12/10/14
to simpl...@googlegroups.com
Okay, this might be a simple question, but I need to figure out a way to join on a Get statement.  Basically I need to do this:

_db.HEADER_TABLE.Get(HeaderId)
                .LeftJoin(_db.DETAIL_TABLE)
                .On(_db.HEADER_TABLE.DetailId == _db.DETAIL_TABLE.DetailId)
                .Select(_db.HEADER_TABLE.Star(), _db.DETAIL_TABLE.DetailName)

Is this possible?

Thanks in advance,

Jon

PS:  I am using the Oracle provider.

Richard Wilde

unread,
Dec 11, 2014, 6:37:55 AM12/11/14
to simpl...@googlegroups.com

Can you try Find instead of Get?

 

_db.HEADER_TABLE.Find(_db.HEADER_TABLE.HeaderId == HeaderId)

     .LeftJoin …

 

Rippo

--
You received this message because you are subscribed to the Google Groups "Simple.Data" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simpledata+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jon.sco...@cop.com

unread,
Dec 11, 2014, 9:48:44 AM12/11/14
to simpl...@googlegroups.com
I suppose I could and just use FirstOrDefault(...).
Reply all
Reply to author
Forward
0 new messages