Back to Devexpress

Entity Framework 4.0+ Server Mode Specifics

windowsforms-120574-controls-and-libraries-data-grid-data-binding-large-data-sources-server-and-instant-feedback-modes-entity-framework-40-server-mode-specifics.md

latest2.5 KB
Original Source

Entity Framework 4.0+ Server Mode Specifics

  • Oct 29, 2020
  • 2 minutes to read

Entity Framework Server Mode Limitations

Compatibility issues with Entity Framework 6.0 and Entity Framework Server Mode Collections.

Breaking changes introduced in Entity Framework 6.0 caused compatibility issues with Entity Framework Server Mode collections (EntityServerModeSource, EntityInstantFeedbackSource).

The following features are not supported :

You can execute the following code in your application’s entry point to avoid these limitations:

EF 6.0 only:

csharp
CriteriaToEFExpressionConverter.EntityFunctionsType = typeof(System.Data.Entity.Core.Objects.EntityFunctions);
CriteriaToEFExpressionConverter.SqlFunctionsType = typeof(System.Data.Entity.SqlServer.SqlFunctions);

In Entity Framework 6.1, use the System.Data.Entity.DbFunctions class instead of the obsolete System.Data.Entity.Core.Objects.EntityFunctions.

csharp
CriteriaToEFExpressionConverter.EntityFunctionsType = typeof(System.Data.Entity.DbFunctions);
CriteriaToEFExpressionConverter.SqlFunctionsType = typeof(System.Data.Entity.SqlServer.SqlFunctions);