We have just updated a number of Entity Framework samples, including two sample providers, to work with the .NET Framework 3.5 and Visual Studio 2008 SP1 released today. Most updates were cosmetic, but there are some major changes too.

  1. EFQuerySamples - Entity Framework Query Samples
    This sample has been updated to provide for better maintainability and added support for multiple providers. This means that the same queries can be executed against different databases and providers. The version that we have released supports 6 backends, but it's trivial to add new ones (the README file that comes with the sample has instructions on doing that). Currently supported are: SqlClient (running against SQL Server 2000, 2005 and 2008), SQL Server Compact Edition 3.5 SP1, EFSampleProvider and EFOracleProvider.

    We've also added ability to run all samples at once (for example in a batch file) and save results to a file, which can be useful when developing your own provider. The command line used to run all samples against EFOracleProvider and store results in a text file called log.txt would look like:

    SampleQueries.exe /logfile log.txt /connectionString "NorthwindEF (EFOracleProvider)" /runall 
  2. EdmMetadataSamples - EDM Metadata Samples
    No major changes in the code, just some general project cleanup - C# and VB projects have now been merged and database setup has changed. If you haven't seen this sample, check it out - it allows you to browse any EDM Model in a graphical way using ASP.NET and to do simple queries. 
  3. EFSampleProvider - Entity Framework Sample
    Provider Changes in reaction to public API cleanup:
      - Removed DbProviderManifest.Token and DbProviderManifest.Provider properties
      - Removed DbFunctionExpression.IsLambda
      - Renamed DbFunctionCommandTree.Function to DbFunctionCommandTree.EdmFunction
      - Removed DbCommandTree.Validate()
      - Added support for missing canonical function CurrentDateTime(). 
  4. EFOracleProvider - Entity Framework Sample Provider for Oracle
    Changes to react to public API cleanup:
      - Removed DbProviderManifest.Token and DbProviderManifest.Provider properties
      - Removed DbFunctionExpression.IsLambda
      - Renamed DbFunctionCommandTree.Function to DbFunctionCommandTree.EdmFunction
      - Removed DbCommandTree.Validate() 
  5. EFLazyLoading - Transparent Lazy Loading for Entity Framework
    Automatically generated code is no longer part of the sample. Instead it is generated as part of every build.

Check back as we continue to update the remainder of our Entity Framework samples over the coming weeks.

 

Jaroslaw Kowalski
SDET, ADO.NET Entity Framework