Hello all
That's example
SQL
create view v_join
as select m.* , d.oneDetail from master m, detail d
where m.key = d.key
LINQ
var view = from v in dc.v_join select new
{
Master = ???? /// that is an issue, how can I construct the objects using same fields but from another query,
Detail = v.oneDetail
};
foreach (var entry in view)
{
Master mEntry = entry.Master; // then we can use it, there are no problems
}
This situation meets rather often and is there some tricky way to construct the object using same fields but from another view, and uses.
When I make such join at C#-side, I get low performance, issues with lazy loads etc. And anyway LINQ issues many queries to fetch each detail record, is is inacceptible at the performance point of view.
There must be obvious solution, I cannot believe nobody faced same problem. All obvious solutions like dc.Translate do almost same but not exactly what I need.
Help appreciated.