Posts Tagged ‘Providers’
Today Entity Framework team released an update to Sample Provider for Entity Framework 4.0. The provider is intended to be an example for ADO.NET provider writers but can also be used and hacked upon by everyone interested in the inner workings of an EF provider.
I’ve just posted a tiny update to EFProviderWrappers sample. It fixes the issue which was reported to me by several users, where NotSupportedException was being thrown during SaveChanges() from caching provider code.
You can download updated bits from MSDN Code Gallery. If you find any other issues, please report them as comments here.
Kati from EntityFramework team has published a detailed post about improvments in generated SQL in Entity Framework v4.0. The improvements are really impressive and make generated SQL perform better and and look much closer to hand-written query code. The best thing is: almost all of the improvements are provider-agnostic, so you will see automatic improvement on queries running on 3rd-party providers. In some cases (LIKE optimization) you will need to use EF4-specific version of the provider.
EFProviderWrappers sample for Entity Framework has been updated to support new features in EFv4 and Visual Studio 2010:
Changes in this release since 3.5SP1 version:
- Upgraded all projects to .NET 4.0 and retargetted assemblies to use .NET Framework 4 Client Profile
- Removed reflection-based code to invoke CreateCommandDefinition()
- Moved AspNetCache to a separate assembly (which depends on .NET Framework 4 Extended Profile)
- Added wrappers for new provider API surface of DbProviderManifest class:
- bool SupportsEscapingLikeArgument(out char escapeCharacter)
- string EscapeLikeArgument(string argument)
- Added wrappers for new provider API surface of DbProviderServices class:
- void DbCreateDatabase(DbConnection connection, int? commandTimeout, StoreItemCollection storeItemCollection);
- bool DbDatabaseExists(DbConnection connection, int? commandTimeout, StoreItemCollection storeItemCollection);
- void DbDeleteDatabase(DbConnection connection, int? commandTimeout, StoreItemCollection storeItemCollection);
- string DbCreateDatabaseScript(string providerManifestToken, StoreItemCollection storeItemCollection);
- Wrappers now work in partial trust – check out AspNetCachingDemo
- Removed Velocity adapter and demo.
- Recreated sample models using edmx (instead of explicit csdl/ssdl/msl)
- Removed the need to explicitly install the database in SQL Server – instead using |DataDirectory| and mdf files local to the project.
The sample can be downloaded from MSDN Code Gallery.
One of the users has reported a problem with using EFProviderWrappers and precompiled views together.
When you pre-compile views, Entity Framework calculates a hash of metadata (which includes csdl,ssdl and msl information), stores it with the generated views and compares it later when metadata is loaded. When loaded metadata doesn’t match the hash stored in pre-compiled views, an exception is thrown. […]
We have just released a sample that shows how to extend Entity Framework in interesting ways by plugging into ADO.NET provider interface. The sample provides two extensions:
- EFTracingProvider – which adds the ability to log all SQL commands that are executed (similar to LINQ to SQL’s DataContext.Log
- EFCachingProvider – which adds transparent query results cache to EF
The sample comes with implementation of distributed cache which uses Velocity CTP 3 as well as an adapter for ASP.NET and simple in-memory cache implementation. […]
Many people are asking if it is possible to use EFOracleProvider with EDM Designer in Visual Studio 2008 SP1. […]
We have just published an updated Sample ADO.NET Provider for Entity Framework.
Changes in the provider APIs since Beta3 release: […]
Here are some tips that may be helpful when developing and testing a data provider that supports Entity Framework
- Tip #1 Validating SchemaInformation SSDL and MSL using EdmGen.exe
- Tip #2 Generating a model from a database without using designer
- Tip #3 Query SchemaInformation using Entity SQL
- Tip #4 Query SchemaInformation using LINQ To Entities
- Tip #5 Common Error Messages and how to resolve them […]