Skip to content

Releases: MapsterMapper/Mapster

v10.0.8-pre01

14 Apr 09:32
f82047c

Choose a tag to compare

v10.0.8-pre01 Pre-release
Pre-release

What's Changed

  • feat: add Flattening mapping for all source type by @DocSvartz in #916

Full Changelog: 10.0.7...v10.0.8-pre01

10.0.7

07 Apr 08:53
98962ae

Choose a tag to compare

What's Changed

Full Changelog: v10.0.6...10.0.7

10.0.7-pre04

01 Apr 09:55
7278f90

Choose a tag to compare

10.0.7-pre04 Pre-release
Pre-release

What's Changed

Full Changelog: v10.0.7-pre03...10.0.7-pre04

v10.0.7-pre03

31 Mar 10:45
6d82c35

Choose a tag to compare

v10.0.7-pre03 Pre-release
Pre-release

What's Changed

  • Fix regression when abstract destination type have required properties by @DocSvartz in #907

Full Changelog: v10.0.7-pre02...v10.0.7-pre03

v10.0.7-pre02

30 Mar 10:22
456502f

Choose a tag to compare

v10.0.7-pre02 Pre-release
Pre-release

What's Changed

Full Changelog: v10.0.7-pre01...v10.0.7-pre02

v10.0.7-pre01

29 Mar 06:19
6a581ce

Choose a tag to compare

v10.0.7-pre01 Pre-release
Pre-release

What's Changed

Full Changelog: v10.0.6...v10.0.7-pre01

v10.0.6

26 Mar 01:13
e192f41

Choose a tag to compare

Breaking change in v10.0+ and new feature

New feature:

  • Fix #883 - Add class ctor using default value for param

In version 7.4.0 this feature was only available for record types

If you encountered this mapping behavior in 7.4.0, it is possible that your class was recognized as a record type, or was mistakenly recognized as a record type See more.

If you need the mapping behavior as for Record, in v10.0+ you can use - [AdaptWith(AdaptDirectives.DestinationAsRecord)] .
If you need the ability to set this setting without using attributes, open issue on this topic.

Example:

[AdaptWith(AdaptDirectives.DestinationAsRecord)]
public class SimpleRecord
{
    public int Id { get; private set; }
    public string Name { get; private set; }

    public SimpleRecord(int id, string name)
    {
        this.Id = id;
        this.Name = name;
    }
}

What's Changed

  • fix: #893 by @DocSvartz in #894
  • fix: Regression in v10 - disabled ConstructUsing and MapToConstructor if have public parameterless constructor by @DocSvartz in #896

Full Changelog: v10.0.4...v10.0.6

v10.0.4

24 Mar 15:24
22b232a

Choose a tag to compare

Breaking change in v10.0+ and new feature

New feature:

In version 7.4.0 this feature was only available for record types

If you encountered this mapping behavior in 7.4.0, it is possible that your class was recognized as a record type, or was mistakenly recognized as a record type See more.

If you need the mapping behavior as for Record, in v10.0+ you can use - [AdaptWith(AdaptDirectives.DestinationAsRecord)] .
If you need the ability to set this setting without using attributes, open issue on this topic.

Example:

[AdaptWith(AdaptDirectives.DestinationAsRecord)]
public class SimpleRecord
{
    public int Id { get; private set; }
    public string Name { get; private set; }

    public SimpleRecord(int id, string name)
    {
        this.Id = id;
        this.Name = name;
    }
}

What's Changed

New Contributors

Full Changelog: v10.0.0...v10.0.4

v10.0.0

18 Mar 15:18
fde27d6

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v7.4.0...v10.0.0

Mapster 7.4.0, Mapster.Tool 8.4.0

21 Sep 20:58

Choose a tag to compare

Welp, this is a big one! It's been just over a year since 7.3.0, but in the meantime we've had plenty of time to thoroughly test this release through 6 pre-releases. This release bring support for .NET 7 as well as a fairly long list of bugfixes. Thank you everyone for your contributions! Packages are as usual available on NuGet, along with symbol packages for convenient debugging.

Known issues

  • Unfortunately, #537 continues to be an unsolved issue, but it does not seem to affect a significant amount of users, and workarounds are simple to implement. Any help to trace down the source of this issue will be greatly appreciated.

Backwards compatibility

  • With #454 we introduced a change to the public API -- previously where TypeAdapterConfig was returned, Mapster will now return an ITypeAdapterConfig interface instead. So make sure to check that your build pipelines succeed before merging this upgrade ;) This change makes it easier to mock and test your mappings.

What's Changed

  • Fix RequireDestinationMemberSource for immutable UseDestinationValue field by @foriequal0 in #415
  • Bump Newtonsoft.Json from 10.0.3 to 13.0.1 in /src/Mapster.JsonNet by @dependabot in #448
  • Added IOrderedQueryable Interface on MapsterQueryable by @noelmugnier in #431
  • Support ConstructUsing in CollectionAdapter by @devbased in #436
  • Add destination parameter to before and after mapping delegates by @devbased in #437
  • Removed directory separator character and use Path.DirectorySeparatorChar instead by @GuimoBear in #440
  • Added ability to skip generating of existing files by @psynomorph in #447
  • Fixes #385 Private Sets by @JMPSequeira in #449
  • Update #397 to fix conflicts by @andrerav in #473
  • Make the project compile and pass tests under net6.0 by @Philippe-Laval in #397
  • Add a non generic overload to ForDestinationType by @Dewera in #465
  • The culture problem has been fixed by @mehmetemineker in #472
  • Refactor IMapper.From to return interface by @gritcsenko in #454
  • Improve installation instructions in the readme by @r-52 in #481
  • Add .net 7.0 TFM to all projects (except benchmark) by @cedwards-telis in #496
  • Add extension method for adding IMapper to service collection by @stormaref in #516
  • Bump Newtonsoft.Json from 13.0.1 to 13.0.2 in /src/Mapster.Tests by @dependabot in #506
  • Add options to Mapster.Tool to generate files with #nullable directives by @kescherCode in #530
  • Add IMapFrom interface for automatic mapping configuration by @stormaref in #533
  • Fix Issues #536 -> Set properties with reflection if destination has init only properties. by @stormaref in #545
  • Mapster.Tool catch ReflectionTypeLoadException by @EniacMlezi in #544
  • Backmerge from main by @andrerav in #549
  • Fix test bug by @stormaref in #552
  • Merge latest from master to development by @andrerav in #553
  • Applying clean code principles by @stormaref in #555
  • Merge latest from master to development by @andrerav in #558
  • Remove mentions to old unsupported frameworks from projects by @satano in #579
  • 🐛 fix(TypeAdapter.cs): Make source parameter nullable by @msadeqsirjani in #583
  • Generating valid, meaningful method name from destination type by @rafalka in #586
  • Fix #370 where capitalized abbreviations are not mapped … by @joshslark in #590
  • Fixing incorrect mapping generation when ShallowCopyForSameType, UseDestinationValue and UseDestinationValue are used by @rafalka in #601
  • Added types used in rules to types hashset by @rafalka in #606
  • Reversing execution order of Before/AfterMapping by @rafalka in #603
  • Not using shallow copy if mapping rule exists by @rafalka in #629
  • Added primary key handling - EntityFromContext EF Core by @lucascaser in #597
  • Add XML documentation comments for public methods by @HoseinHabibiyan in #626
  • Merge development to main pending new release by @andrerav in #591

New Contributors

Full Changelog: v7.3.0...v7.4.0