Code First Join options in Entity Framework 5 -


i'm creating webservice layer on legacy sql server based system. it's pretty large , complicated business application has large number of stored procedures perform select statements . of these stored procedures join number of tables , produce single resultset easy consumption client.

in building webservice want take advantage of ef, , using code first approach 80% of use cases can achieved mapping direclty tables. have number of use cases need cross tbale views of data provided stored procedures. see have 3 options:

  1. create new pocos represent stored procedure returns , link these existing stored procedures (let sql join , re-use exisitng code)
  2. create new pocos stored procedure return, populate association othe ef entities (let ef jons)
  3. do joins somehow in linq

what people think best practice in situations this, guess of coming against everyday?

thanks, andy

many book out there. julie lerman... more recent http://www.apress.com/9781430257882

with navigation properties, can things without old fashioned joins.

so 4) in linq,and let ef joins. use navigation properties. can many logical joins , avoid join keyword.

this blog shows how easy , why linq no join syntax results in joins @ db level. http://blog.staticvoid.co.nz/2012/7/17/entity_framework-navigation_property_basics_with_code_first


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -