Hello is there a known issue for left outer join not working? I think I 
copied the left join exactly

If I use
         MyDataContext dc = new MyDataContext(conn);
         var q = from stuff in dc.stuffs
                 join price in dc.prices
                 on stuff.sifra equals price.sifra
                 into stuff_price
                 where 
stuff.name.ToLower().Contains(tbSearch.Text.ToLower())
                    || 
stuff.shortname.ToLower().Contains(tbSearch.Text.ToLower())
                 from ac in stuff_price.DefaultIfEmpty()
                 select new
                 {
                    stuff.name
                 };

I get all the stuffs from database, but when I add a field from the prices 
table:

         MyDataContext dc = new MyDataContext(conn);
         var q = from stuff in dc.stuffs
                 join price in dc.prices
                 on stuff.sifra equals price.sifra
                 into stuff_price
                 where 
stuff.name.ToLower().Contains(tbSearch.Text.ToLower())
                    || 
stuff.shortname.ToLower().Contains(tbSearch.Text.ToLower())
                 from ac in stuff_price.DefaultIfEmpty()
                 select new
                 {
                    stuff.name
                  *, **ac.price*
                 };

I get no stuff out no matter if there is a record in the right table or not.

What am I doing wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/dblinq/-/bgbJuDF9gLkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.

Reply via email to