entity framework - How do I avoid large generated SQL queries in EF when using Include() -
I am using EF (dll version 4.4) for query against database. There are several tables with information in the database, when actually the DB is sent, then I see a huge, almost 1300 line SQL query (which I'm not going to paste here due to the size). I see the query running in this context:
entities Plans. ("Program"). ("Programmable Object"). ("Program .fees") include ("program.intakes"). Include ("Programs .requirements"). Include in ("Programcodes") Include in ("focus"). Include in ("code"). Include in ("Exception") ("Requirements") where there are plans. Select code == planCode schemes) .SingleOrDefault (); I want to refrain from going back to the server while collecting information from each of the related tables, but with such a large query, I am thinking that if there is a better way to do this?
Thank you.
It's a bit late, but your data is only changing once a day, You should put everything in the scene and put this footage in your EF model.
Comments
Post a Comment