Skip to content

Changes & Breaking Changes

Leonardo Porro edited this page Feb 8, 2024 · 13 revisions

Make sure to take a look, and feel free to open an issue if you don't agree with the change.

8.0.6

  • Map many objects at the same time, load them all in a single query.

TODO for next version:

  • Documentation for Foreign Key Mapping.
  • Clone MapperOptions (so profiles can start from a copy of Default)

8.0.5

  • New Annotations ([MapTo], [MapFrom], [DiscriminatorName] and [DiscriminatorValue])
  • Fixed an old debt with a test
  • Tidy up more tests and test names

8.0.4

  • UseDetached (deprecated) was removed in favor of UseMapper (breaking change!)
  • MapperOptions.Configure (deprecated) was removed in favor of MapperOptions.Type (breaking change!)
  • EntityMapperOptionsBuilder was removed and EntityMapperOptions is being used directly now (breaking change!)
  • Conventions now are being applied after the type is configured (may break some unknown scenario?)
  • Annotations refactored to be easier to handle.
  • Tests renaming and tidy up.
  • Unified mapper cache and merged two GetOrAdd to one (internal, may break if you hacked it?)
  • New UseMapper signature that receives EntityMapperOptions instead of Action.
  • IPropertyNameConvention changed to IMemberNameConvention (breaking change!)

[New features]

  • Map foreign keys to the primary key of the associated entity. Check here.

  • UseMapper overload with a single EntityMapperOptions instead of a delegate.

  • Default() is not needed anymore since EntityMapperOptions now inherits from MapperOptions. It will be deprecated and deleted at some point.

  • IMemberNameConvention allows to add multiple named conventions, the first one in returning a name, wins. Adding CamelCaseMemberNameConvention to MapperOptions allows to map sources in camel case to targets in pascal case, but if you don't remove DefaultMemberNameConvention, it gets applied after, which leads to a kind of ignore-case.

8.0.0

  • Multiframework: 6, 7 & 8 supported
  • New CI/CD using Github actions

8.0.0 (preview)

  • Dropped support for netstandard. All the target frameworks are now "net8.0".

7.2.0

Breaking changes! Only if you customized internal components. Otherwise it should work out of the box.

  • IMapContext.TrackChange was removed an the EF specific code was moved to new mappers in Mappers.EntityFramework.

  • Added new concept: Bind. It is a mapping as a single expression created specially for Projections. Now Projections has features similar to Mapping, like inheritance and property renaming. The idea is to fix some bugs and extend it even more.

7.1.6

  • UseDetached() marked as obsolete. Please use UseMapper() instead.
  • Internal EF classes renamed: e.g. EFMapper is now EntityMapper. That might break something if the library has been extended/hacked.
  • Profile management configuration refactor.
  • MapParameters updated:
    • Upsert -> MissingRootBehavior
    • AddAggregations -> MissingAggregationBehavior
    • AssociateExistingCompositions -> ExistingCompositionBehavior Added CompositeCollectionBehavior.

7.1.5

  • [NotMapped] won't be handled anymore. Please replace it by [MapIgnore]. Also .NotMapped() fluent extension was changed to .Ignore().