AgileMapper contains version-specific support for Entity Framework 5, Entity Framework 6, and Entity Framework Core, extending each version's ability to support query projection.

Type Conversion

The following conversions are supported, along with the same projections from and / or to Nullable types:

Projection from Projection to EF Core EF 6 EF 5
Bool String
  • - [x]
  • - [x]
  • - [x]
DateTime String *
  • - [x]
  • - [x]
  • - [x]
Numeric Bool
  • - [x]
  • - [x]
  • - [x]
Numeric Enum **
  • - [x]
  • - [x]
  • - [x]
Numeric String ***
  • - [x]
  • - [x]
  • - [x]
String Bool
  • - [x]
  • - [x]
  • - [x]
String DateTime
  • - [x]
  • - [x]
  • - [x]
String Enum **
  • - [x]
  • - [x]
  • - [x]
String Guid
  • - [x]
String Numeric
  • - [x]

* In DateTime to string conversion: - EF Core uses CultureInfo.CurrentCulture.DateTimeFormat - EF 6 uses the data store's date format - EF 5 uses SqlFunctions.DatePart to project to yyyy-%M-%d %H:%m:%s

** Flags enums are not supported

*** In decimal and double to-string conversion, EF 5 only includes the first two decimal places

Projection Features

Feature EF Core EF 6 EF 5
Derived Types *
  • - [x]
Recursion **
  • - [x]
Collection Members ***
  • - [x]
  • - [x]

* EF5 and EF6 do not support casting a projected Type to its base Type, so do not support projecting to conditional derived types.

** EF5 and EF6 do not support creating instances of a projected Type with differing numbers of member initialisations in the same query, so do not support projecting recursive relationships.

*** EF5 can only project to IEnumerable{T} members, not ICollection{T}, List{T}, T[], etc.