I’m trying to eagerly load an entity and its related properties (basic one to many) using the LoadWith and AssociateWith DataLoadOptions. However, after looking at the generated SQL I noticed that the statements generated by LoadWith are all Left Outer Joins.
So the code below generates all left outer joins to fetch the data of the associated properties. Why is that? And is there any way to get LoadWith to generate inner joins instead. I know I can do this with a simple “Linq join”, however, I like how clean and simple the LoadWith syntax is. Thanks in advance
dataLoadOptions.LoadWith(Of TCustomer)(Function(c) c.Orders)
dataLoadOptions.LoadWith(Of TOrder)(Function(o) o.Products)
dataLoadOptions.LoadWith(Of TProduct)(Function(p) p.ProductTranslations)
dataLoadOptions.AssociateWith(Of TProduct)(Function(c) c.ProductTranslations.Where(Function(t) t.Language = "En"))
1 Answer