Linq to Sql query reuse
- by UserControl
Let's say we have a view V1 and V2 that is declared like:
create view V2 as
select V1.*, V2.C1, V2.C2, V2.C3
from V1
join V2 on V1.Key = V2.Key
where bla-bla
So V2 narrows down the result set of V1 and adds some joins. And there is a retrieval routine in C#
IEnumerable<V1> GetData(MyFilter filter, MySortOrder order) {}
I want to reuse with V2. Is it possible without performing joins in L2S rather than in database? Should i manually create a base class in the database context or something?