I am researching the feasability of converting an existing asp.net web forms project to MVC 2 web apps project. The existing SQL queries are of form:
Select [data]
from [table]
inner join [linkedDb1.Table] on key
where [constraints]
There are two linked DB’s. Entitity framework 4 does not support linked servers. So I must choose:
A. Create views for each table and join on the views.
B. Keep the inline SQL and somehow write a custom model as a wrapper that can be consumed by Strongly Typed – partial views on the Dashboard.
C. Wrap each DB in a CRUD service and join in memory (data is assumed < 100 rows by 10 columns).
A appears straight forward, B I don’t know how to do, C is architecturally clean, but potentially performance hindered.
How do I create a custom model that works with B? Does anyone foresee any project killing ideas with A, B, or C?
Make a stored procedure and add that to your dbml. It will be faster and will provide the EF objects you’re looking for.