Tracing and Caching Provider Wrappers for Entity Framework is a sample which demonstrates how to implement
wrapping providers which add interesting functionality to an EF application.
Included are:
EFProviderWrapperToolkit - common toolkit for writing provider wrappers.
EFCachingProvider - provides caching of LINQ and ESQL query results
EFCachingProvider.Web - provides caching in ASP.NET environment.
EFTracingProvider - enables tracing (logging) of SQL commands
Other projects:
AspNetCachingDemo - demonstrates using tracing and caching in ASP.NET application using Entity Data Source
ConfigOnlyInjection - explains injecting tracing behavior into an application by changing App.config and ssdl file
EFProviderWrapperDemo - couple of end-to-end demos of using tracing and caching providers.
EFCachingProvider.Tests - unit tests for in-memory cache implementation
NorthwindEF - NorthwindEF model used by the samples
The sample works with Entity Framework 4.0.
What is new in .NET 4.0 version
===============================
1. Upgraded all projects to .NET 4.0 and retargetted assemblies to use .NET Framework 4 Client Profile
2. Removed reflection-based code to invoke CreateCommandDefinition()
3. Moved AspNetCache to a separate assembly (which depends on .NET Framework 4 Extended Profile)
4. Added wrappers for
DbProviderManifest:
public override bool SupportsEscapingLikeArgument(out char escapeCharacter)
public override string EscapeLikeArgument(string argument)
DbProviderServices:
protected override void DbCreateDatabase(DbConnection connection, int? commandTimeout, StoreItemCollection storeItemCollection)
protected override bool DbDatabaseExists(DbConnection connection, int? commandTimeout, StoreItemCollection storeItemCollection)
protected override void DbDeleteDatabase(DbConnection connection, int? commandTimeout, StoreItemCollection storeItemCollection)
protected override string DbCreateDatabaseScript(string providerManifestToken, StoreItemCollection storeItemCollection)
5. Wrappers now work in partial trust - check out AspNetCachingDemo
6. Removed Velocity adapter and the demo.
7. Recreated sample models using edmx (instead of explicit csdl/ssdl/msl)
8. Removed the need to explicitly install the database in SQL Server - instead using |DataDirectory| and mdf files local to the project.
没有合适的资源?快使用搜索试试~ 我知道了~
实现Entity Framework的二级缓存例子
共112个文件
cs:62个
user:8个
csproj:8个
1星 需积分: 10 27 下载量 142 浏览量
2014-03-23
00:08:19
上传
评论
收藏 1.64MB ZIP 举报
温馨提示
实现了EF在DB First的模式下缓存对象数据的例子,目前EF二级缓存还没有官方的支持。
资源推荐
资源详情
资源评论
收起资源包目录
实现Entity Framework的二级缓存例子 (112个子文件)
Global.asax 101B
Default.aspx 5KB
StyleCop.Cache 7KB
StyleCop.Cache 6KB
StyleCop.Cache 4KB
clean.cmd 715B
App.config 2KB
Web.config 2KB
App.config 621B
NorthwindEF.Designer.cs 128KB
NorthwindEF.Designer.cs 127KB
NorthwindEF.cs 109KB
DbCommandTreeScanner.cs 25KB
InMemoryCacheTests.cs 16KB
InMemoryCache.cs 16KB
DbProviderServicesBase.cs 14KB
DbConnectionWrapper.cs 13KB
EntityConnectionWrapperUtils.cs 11KB
Program.cs 11KB
EFCachingDataReaderBase.cs 10KB
EFCachingCommand.cs 9KB
DbProviderManifestWrapper.cs 9KB
EFCachingCommandDefinition.cs 8KB
DbCommandWrapper.cs 8KB
EFCachingDataReaderCacheWriter.cs 7KB
EFTracingConnection.cs 6KB
EFCachingDataReaderCacheReader.cs 6KB
DbProviderFactoryBase.cs 6KB
AspNetCache.cs 5KB
EFTracingCommand.cs 5KB
EFCachingProviderFactory.cs 5KB
EFProviderWriterExtensionMethods.cs 4KB
CustomCachingPolicy.cs 4KB
CommandExecutionEventArgs.cs 4KB
ExtendedNorthwindEntities.cs 3KB
ExtendedNorthwindEntities.cs 3KB
GlobalSuppressions.cs 3KB
DbTransactionWrapper.cs 3KB
EFCachingConnection.cs 3KB
EFCachingTransaction.cs 3KB
EFTracingProviderConfiguration.cs 3KB
CachingPolicy.cs 3KB
EFTracingExtensionMethods.cs 3KB
EFCachingProviderServices.cs 2KB
EFTracingProviderServices.cs 2KB
DbCommandDefinitionWrapper.cs 2KB
EFCachingExtensionMethods.cs 2KB
Default.aspx.designer.cs 2KB
ICache.cs 2KB
EFCachingProviderConfiguration.cs 2KB
EFTracingProviderFactory.cs 2KB
NoCachingPolicy.cs 2KB
CacheAllPolicy.cs 1KB
EFProviderWrapperServices.cs 1KB
EFProviderWrapperFactory.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
EFProviderWrapperConnection.cs 1KB
Global.asax.cs 1KB
AssemblyInfo.cs 1KB
DbQueryResults.cs 986B
GlobalSuppressions.cs 719B
Program.cs 635B
CommandExecutionStatus.cs 546B
GlobalSuppressions.cs 488B
Default.aspx.cs 339B
NorthwindEFModel.csdl 13KB
AspNetCachingDemo.csproj 7KB
EFProviderWrapperDemo.csproj 6KB
EFCachingProvider.csproj 6KB
ConfigOnlyInjection.csproj 6KB
EFProviderWrapperToolkit.csproj 5KB
EFTracingProvider.csproj 5KB
EFCachingProvider.Tests.csproj 3KB
EFCachingProvider.Web.csproj 3KB
NorthwindEF.edmx 55KB
NorthwindEF.edmx 54KB
NorthwindEF_log.ldf 1024KB
NorthwindEF_log.ldf 1024KB
NorthwindEF.mdf 3.94MB
NorthwindEF.mdf 3.94MB
NorthwindEFModel.msl 19KB
EFProviderWrappers.sln 9KB
SigningKey.snk 596B
NorthwindEFModel.WithTracing.ssdl 13KB
NorthwindEFModel.ssdl 13KB
Settings.StyleCop 2KB
Common.targets 1KB
Local.testsettings 2KB
LICENSE.txt 3KB
README.txt 2KB
README.txt 243B
AspNetCachingDemo.csproj.user 1KB
EFTracingProvider.csproj.user 1KB
EFCachingProvider.csproj.user 478B
共 112 条
- 1
- 2
资源评论
- shichangai2014-04-18这个没什么实际可用价值。实际项目中没有人会这样用吧。
volcanodeng
- 粉丝: 0
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功