Generate Multi-Parameter LINQ Search Queries with Run-time Specified Return Type
问题 Having spent a long time solving this problem, I wanted to share the solution. Background I maintain a large web application with the primary function of managing orders. It is an MVC over C# application using EF6 for data. There are LOTS of search screens. The search screens all have multiple parameters and return different object types. The Problem Every search screen had: A ViewModel with the search parameters A Controller method to handle the Search event A method to pull the correct data