开发者

Entity framework code first caching

开发者 https://www.devze.com 2023-03-19 21:50 出处:网络
It is possible to use the Entity framework caching and tracing framework with the new entity framework 4.1 code first?If so then is there a good example of this, otherwise what is the best way to cach

It is possible to use the Entity framework caching and tracing framework with the new entity framework 4.1 code first? If so then is there a good example of this, otherwise what is the best way to cache some开发者_Go百科 queries?


Here is an example of a caching system for EntityFramework (with EDMX) http://code.msdn.microsoft.com/EFProviderWrappers-c0b88f32

Here is how you use that example with CodeFirst http://jkowalski.com/2010/04/23/logging-sql-statements-in-entity-frameworkcode-first/

Although he is demoing the tracing provider rather than the caching provider you can use the same principals

0

精彩评论

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