开发者

Preloading entities with EF4

I have a bunch of classificators which will be used quite often. I wan't to preload those entities when my program st开发者_运维技巧arts so that I wouldn't have to do it later when any object references them.

How can this be done in EF4?


There's a long-ish walkthrough here:

How to Cache Entity Framework Reference Data

But profile first. Writing good projections may be faster than materializing entire entities with cached references. Even loading single referenced objects is quite fast. Don't "optimize" stuff which isn't slow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜