Entity Framework 4.0+ Server Mode Specifics

  • 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:

  • Filtering in the Auto Filter Row against numeric columns.
  • Searching with the Find Panel against numeric columns.
  • Incremental searching against numeric columns.
  • The following column group intervals (GridColumn.GroupInterval):

    • Date
    • DateMonth
    • DateRange
    • DateYear
    • Default (for DateTime columns)
  • A numeric column as a display member for a lookup editor.
  • The following function operators in filters and unbound columns:

    • ToStr (if the parameter is an operand property referencing a numeric column)
    • AddDays
    • AddHours
    • AddMilliSeconds
    • AddMinutes
    • AddMonths
    • AddSeconds
    • AddYears
    • DateDiffDay
    • DateDiffHour
    • DateDiffMilliSecond
    • DateDiffMinute
    • DateDiffMonth
    • DateDiffSecond
    • DateDiffYear
    • GetDate
  • The Like operation.

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

EF 6.0 only:


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.


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