I know that EF4 does not support User Defined Table Types (yet). I need to write a query, that accepts a list of pairs <product_code, quantity>
and returns a record set with product_code
and price
for each product_code
passed, based on quantity
. What is my best option with EF4 to model this? The calculation in the database to get the price are quite complex, and there are a lot of products, which means that most of the action should happen server-side. (For example I can't get full list of prices from server first and then filter to the products I need on the client. I also can't apply quantity to the calculation on the client, that has to be passed to server and processed there). Any thoughts are welcome.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…