MVC more specified models should be populated by more precise query too?

Posted by KevinUK on Stack Overflow See other posts from Stack Overflow or by KevinUK
Published on 2010-03-27T10:18:54Z Indexed on 2010/03/27 10:23 UTC
Read the original article Hit count: 150

If you have a Car model with 20 or so properties (and several table joins) for a carDetail page then your LINQ to SQL query will be quite large.

If you have a carListing page which uses under 5 properties (all from 1 table) then you use a CarSummary model. Should the CarSummary model be populated using the same query as the Car model?

Or should you use a separate LINQ to SQL query which would be more precise?

I am just thinking of performance but LINQ uses lazy loading anyway so I am wondering if this is an issue or not.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about linq-to-sql