I have got multiple views with exactly same records structure but different filtering logic. I'd like to be able to query any of them with Entity Framework and it would seem much more natural if they would be returning values of same type instead of using a different type (with exactly same members) for every view. How to achieve this?
I use visual model designer with database-first approach.
UPDATE:
For example: we can have Vehicles
table,
create view [GreenVehicles] as select * from [Vehicles] where [Color]='Green';
and
create view [GreenVans] as select * from [GreenVehicles] where [Type]='Van';
The task is to make it so that we would be able to query GreenVans
as a collection of GreenVehicles
.