Skip to content

Releases: LuckyPennySoftware/AutoMapper

6.2.0

09 Nov 13:10
Compare
Choose a tag to compare

As part of this release we had 70 issues closed.

Features

Improvements

  • #2389 Allow ToList/ToArray for primitive types
  • #2387 Can't map IEnumerable to List
  • #2382 Better error message
  • #2380 Identified property parent incorrect in error message following ReverseMap() in nested models.
  • #2362 Consider derived maps when setting PreserveReferences
  • #2356 PreserveReferences with inheritance
  • #2308 Mention ForPath
  • #2307 Added NeutralResourcesLanguageAttribute
  • #2303 Missing NeutralResourcesLanguageAttribute
  • #2297 Enforce calling Mapper.Initialize once
  • #2295 Enforce calling Mapper.Initialize once
  • #2282 Null check static methods too
  • #2252 Add PreCondition overload that takes source and ResolutionContext as parameters
  • #2247 Make debugging easier
  • #2243 Speed up the tests
  • #2224 Inherit ForPath
  • #2222 Validate included types
  • #2221 Allow constructor mapping for value types
  • #2207 Constructor mapping with struct
  • #2191 Reverse mapping unflattening not working with IncludeBase
  • #2190 Use Resolve instead of Find for expression generation
  • #2185 Allow simple MapFrom-s to pass validation
  • #2180 Sdk style tests
  • #2177 Fix for #2166 and #2167.
  • #2172 AssertConfigurationIsValid with MemberList.Source doesn't recognize inherited ForMember mapping
  • #2166 Issue with MapExpression when expression checks if a string equals null

Bugs

  • #2383 Fix for #2378 Expression mapping with coalesce operator is extremely slow or just hangs up.
  • #2378 Expression mapping with coalesce operator is extremely slow or just hangs up
  • #2376 Preserve references with ctor mapping
  • #2363 ArgumentException: An item with the same key has already been added.
  • #2348 Preserve references doesn't make sense for value types
  • #2343 If it's a dynamically created type map, we need to seal it outside Ge…
  • #2338 Adding member name inheritance; fixes #2333; fixing type usage inheri…
  • #2333 typeof() version of IncludeBase() is not working
  • #2286 Issue 2246 - UseAsDataSource throwing ArgumentNullException.
  • #2245 Help the CLR find the assemblies it needs
  • #2233 We have to set everything in the plan, we don't get a second chance
  • #2230 Allow nullable to string conversion
  • #2227 The map is for the interface, not for the class, so return a proxy
  • #2223 Throw when we cannot create the destination
  • #2219 Introduce a global lock when creating type maps on the fly
  • #2205 Ignore properties with no setter
  • #2202 Proposed fix for Error when mapping nested expressions #2201
  • #2201 Error when mapping expressions with array members
  • #2170 Use List for most IEnumerable-s
  • #2169 AllowNullCollections=false not honored for IEnumerable
  • #2167 Fix for issue #2166

Where to get it

You can download this release from nuget

6.1.1

27 Jun 03:18
Compare
Choose a tag to compare

As part of this release we had 12 issues closed.

This release includes the ability to turn off the un-flattening behavior added in 6.1.0 using ForPath.Ignore

Bugs

  • #2156 Generate setters only when they are required
  • #2155 NotSupportedException exception with EF unmapped members
  • #2152 Unexpected behavior for CustomValueResolver
  • #2151 ReverseMap creates object for navigation property
  • #2147 Allow null colections
  • #2145 AllowNullCollections=false not honored for ICollection
  • #2144 Avoid conflicts between path maps and property maps
  • #2143 ResolveUsing not working correctly after ReverseMap

Improvements/Features

  • #2162 Allow ignores on reverse map paths
  • #2161 Allow ignoring a path in ReverseMap
  • #2158 Request a repro
  • #2153 Fix ExpressionBuilder GetMapExpression behaviour

Where to get it

You can download this release from nuget

6.1.0

14 Jun 11:12
Compare
Choose a tag to compare

As part of this release we had 28 issues closed.

Bugs

  • #2115 Null checks
  • #2109 Consider only constructors that can resolve all parameters
  • #2102 ResolveUsing problem
  • #2100 Check the underlying type
  • #2097 Use the runtime type for the destination too
  • #2096 ArgumentException when trying to map a ViewModel List to Domain List
  • #2065 Use the existing destination
  • #2064 Mapping to readonly IEnumerable property
  • #2054 Regression - Exception in System.Linq from NullableSourceMapper
  • #2025 Passing the type doesn't seem to help

Improvements/Features

  • #2136 Disallow duplicate create map calls
  • #2131 Let clause
  • #2128 Disallow duplicate CreateMap calls per mapping
  • #2124 Detect cycles at config time and set PreserveReferences accordingly
  • #2114 Inefficient query produced
  • #2110 AddProfiles() includes internal types when scanning assemblies
  • #2107 Make object mappers help with validation
  • #2085 Project nullable to GetValueOrDefault
  • #2082 Unable to create a map expression from Person.FKContactTypeID (System.Nullable`1[System.Int64]) to RelatedPersonDTO.FKContactTypeID (System.Int64)
  • #2080 Reverse MapFrom
  • #2074 Unflatten
  • #2068 Support un-flattening
  • #2063 AddProfiles() should be able to include internal profiles
  • #2059 Allow source struct collections
  • #2058 InvalidOperationException when mapping a collection from struct enumerator
  • #2038 Consider abstract types
  • #2037 Instances of abstract classes cannot be created
  • #2023 Introducing Internal namespaces and classes to support extensibility

Where to get it

You can download this release from nuget

6.0.2

22 Mar 14:17
Compare
Choose a tag to compare

Removed the unused ValueTuple dependency

6.0.1

20 Mar 13:37
Compare
Choose a tag to compare

Stupid assembly version was missing.

6.0.0

16 Mar 13:34
Compare
Choose a tag to compare

As part of this release we had 62 issues closed.

List of breaking changes:

5.2.0...6.0.0

Features

  • #1916 Provide an alternative to using ProjectTo() and static initialization…
  • #1906 Support older collection types
  • #1883 Add Advanced property and put BeforeSeal function in it
  • #1876 Add a per member option DoNotInline
  • #1866 Need to get ProfileConfiguration before sealed
  • #1848 Avoid static state; Mapper registry managed through mapper configuration

Improvements

  • #1957 5.2.0 issue value type projection expression
  • #1956 ProjectTo<>(...,Expession<<>>[]membersToExpand): lambda for a Value Type causes NullReferenceException
  • #1933 Exclude more system base types
  • #1930 Concurrency
  • #1922 Remove DoNotUseDestinationValue
  • #1919 Custom config validation
  • #1913 Inherit ignore unless overriden in the derived map; fixes #1910; fixe…
  • #1910 inheritedMapper for map to a existed object is not working right.
  • #1895 Use ReverseTypeMaps when configuring closed generic TypeMaps
  • #1889 Multiple value resolver interfaces
  • #1887 To support resolver that implements multiple IValueResolver interfaces
  • #1877 Handle fields too; fixes #1875
  • #1875 Simple ProjectTo throws Exception, stating an incorrect Property type
  • #1872 Match on requested types if runtime types don't match; fixes #1865
  • #1865 Mapping nullable does not use nullable map when called with a non-null value
  • #1861 Add link to BuildExecutionPlan
  • #1860 Add a link to the wiki
  • #1844 Expose the execution plan
  • #1842 AutoMapper.Debugging
  • #1822 Just look for IMemberValueResolver; fixes #1813
  • #1813 Interfaces derived from IMemberValueResolver<,,,> break BuildValueResolverFunc
  • #1732 Inherited Ignore Ignored

Bugs

  • #1991 We need the lock
  • #1931 AutoMapper 4.1.1 -> 5.2.0 Dynamic Enum Mapping differences
  • #1911 fix for issue 1886 and unit test in SourceInjectedQuery class
  • #1908 Missing property name on AssertConfigurationIsValid exception
  • #1905 InvalidOperationException when mapping IList to CollectionBase via ResolveUsing
  • #1901 Preserve references
  • #1892 Best way to preserve compatibility for v4 to v5 upgrade
  • #1890 Correct order of ExpressionBinders
  • #1886 Mapping of Expression<Func<T,bool>> causes exception starting from AutoMapper 5.2.0
  • #1879 QueryableExtensions: NullableExpressionBinder used in preference to CustomExpressionBinder
  • #1863 Default enum value to string
  • #1862 Mapping Enum to string - default enum value get mapped to null
  • #1858 Make the constructor parameter resolver type safe; fixes #1857
  • #1854 Preserve references bug
  • #1847 InvalidOperationException : ValueFactory attempted to access the Value property of this instance.
  • #1834 Always null check
  • #1833 Auto-flattening null reference exception
  • #1831 Somehow arrays are different :); fixes #1830
  • #1830 Mapping Class to Derived DynamicObject gives NullReferenceException
  • #1828 Avoid casts; hopefully they are not needed; fixes #1827
  • #1827 Automapper throws exception with ProjectTo and EF6
  • #1819 Add required casts for non generic ResolveUsing
  • #1818 Box once to keep object identity; fixes #1816
  • #1816 Regression between Automapper 4 and 5
  • #1794 Performance issues and PreserveReferences not working correctly

Where to get it

You can download this release from nuget

5.2.0

23 Nov 23:52
Compare
Choose a tag to compare

As part of this release we had 74 issues closed.

Features

Improvements

  • #1809 Check the destination type override to be a derived type
  • #1753 Expose the destination member
  • #1746 Make IncludeBase work with ReverseMap
  • #1745 Add .editorconfig
  • #1743 ReverseMap ignores mapping inheritance (AutoMapper 5.1.1)
  • #1734 Compile once
  • #1719 Add some helpful casts
  • #1714 Always map array contents & remove the primitive array mapper.
  • #1687 Make it easier to spot missing services
  • #1677 Lazily create convert expressions
  • #1655 UWP 5.2.2 + AutoMapper 5.1.1 = Insanely long builds
  • #1628 Match by name; the member type can be generic and so the types won't …
  • #1624 InvalidOperaionException when automapping using open generics and including the source in a ForMember statement
  • #1530 Make constructor mapping a little more lenient
  • #1528 Invalid constructor mappings throw exceptions at seal-time

Bugs

  • #1814 Filtering dynamic assemblies
  • #1812 Applying partially trusted callers only for full .NET
  • #1806 Catch NRE in MapFrom with value types; fixes #1798
  • #1805 Return null when mapping from null string to nullable
  • #1804 string -> int? conversion returning 0 rather than null
  • #1798 In AutoMapper 5.1.1 MapFrom method does not ignore Null Reference Exception but throws it
  • #1788 Checking for closures (constant expressions) when mapping expressions
  • #1785 Fixing expression visitors to properly visit the underlying expressio…
  • #1778 MapFrom variable 'src' of type 'Xyz' referenced from scope '', but it is not defined
  • #1774 Mapping from "string" to "nullable enum" throws exception
  • #1772 Map string to nullable enum
  • #1765 Fix #1482
  • #1764 MapFrom/ResolveUsing no longer support null assignment
  • #1752 Consider VB closures
  • #1748 Paramterized mappings not working using VB.NET and Profiles
  • #1740 Mapping to/from object doesn't seem useful
  • #1731 Bugfix #1727
  • #1727 Automapper v5.1.1 does not work with ObservableDictionary where Automapper 4 does
  • #1718 When we map a nullable, we should map the underlying type unless an e…
  • #1717 Mapping from nullable enum stopped working in AutoMapper 5
  • #1711 Multiple IEnumerable interfaces
  • #1697 AddProfiles Blows Up With NotSupportedException if Any of the Assemblies are Dynamic
  • #1692 Fixed memory leaks
  • #1691 ConcurrentBag causes memory leak
  • #1685 MethodAccessException: Windows Phone 8.1 (WinRT)
  • #1672 Not needed code - nullables
  • #1664 Differentiation between type and nullable type
  • #1662 Get the element type from the destination object itself
  • #1656 Creating a map for collections throws when destination items of derived type
  • #1654 Short-circuit evaluation
  • #1651 Complex flattening
  • #1649 Convert the null substitute to what's needed for projections
  • #1645 Dictionary mappings no longer handle non-empty dictionary destinations in 5.1.1
  • #1642 Convert to nullable
  • #1641 Different ProjectUsings for nullable and non-nullable ints
  • #1638 Decimal to nullable decimal
  • #1635 Call the condition after setting the source property value because it…
  • #1634 Conditions do not get either Source or Destination values
  • #1632 Just clear the destination everytime we don't create it ourselves
  • #1631 NullReferecnceException when flattening values
  • #1630 Mapping onto existing object does no longer clear existing items from List [5.1.1]
  • #1626 Don't hard code the ToString call, use the StringMapper; remove the t…
  • #1620 Mapping object to string fails with NullReferenceException when called on null.
  • #1618 Profile.AllowNullCollections ignored?
  • #1617 Error when mapping an expression containing a (non-parameter) instance of the mapped type
  • #1607 IMemberValueResolver is created and called twice
  • #1482 UseAsDataSource Translate constants with PropertyMap changes.
  • #1008 UseAsDataSource() - filtering by date in OData query results in mapping exception
  • #882 UseDataSource() with property-path expression leads to exception

Where to get it

You can download this release from nuget

5.1.0

12 Aug 03:53
Compare
Choose a tag to compare

As part of this release we had 57 issues closed.

Features

  • #1573 Base class for simple object mappers that don't want to use expressions.
  • #1572 Constructor tests with prefixes and postfixes for source and destination
  • #1568 Profile scanning
  • #1253 Recognize pre/postfixes in ctor args

Improvements

  • #1559 Add an AllowNull configuration
  • #1557 Inline the easy cases
  • #1549 Break long line in AutoMapperConfigurationException
  • #1547 [aestethic] Missing newline in AssertConfigurationIsValid output
  • #1533 Portable profile 111 support
  • #1527 Better exception messages
  • #1512 Configuration faster
  • #1493 Enumerators
  • #1377 Inline sub map expressions
  • #1001 Expression.NotEqual causing an exception when using queryable projections

Bugs

  • #1612 Automapper is actually built with debug flags / non optimized when building in release mode.
  • #1602 Don't fail when the parameter name is null
  • #1601 Map from null interface
  • #1588 Struct with collection
  • #1579 The null substitute should have the same type as the value resolved
  • #1578 Using NullSubstitute with different source/destination types throws ArgumentException
  • #1567 Consider the underlying nullable type a related type when resolving t…
  • #1566 ConvertUsing from value type to the same value type doesn't work
  • #1558 Resorting to nuspec because of nuget weirdness
  • #1555 Don't allow duplicate After/Before Map registrations
  • #1554 Add a null guard instead of rewriting each node
  • #1552 5.0.2 Can't create map where source is DateTime.Date
  • #1550 Update to 5.0.2 broke existing maps
  • #1538 Map to existing object
  • #1537 Convert using to string
  • #1529 Possible regression: AutoMapper 5.0.2 calls ToString() where 4.x didn't
  • #1523 Reuse the default context even only when MaxDepth and PreserverRefer…
  • #1522 ExpandoObject is a dictionary and should be mapped as such
  • #1520 Fix #1518
  • #1519 Added failing unit test for #1518
  • #1518 Index was outside the bounds of the array.
  • #1516 Multiple destination type maps for the same source type fails and uses the first type instead when PreserveReferences is specified.
  • #1511 Revert the order of the binders; I'm guessing this is the root cause …
  • #1509 Projecting EF queryables with AllowNullCollections throws exception
  • #1508 Only doing null fixing on custom member mappings when there are only …
  • #1505 Exception when configuring mappings (worked in 4.2.1)
  • #1502 Fixes #1495
  • #1498 Fixes #1497
  • #1497 Automapper 5.0.2: Expression mapping
  • #1495 Automapper 5.0.2: System.Guid and TryExpression
  • #1494 Better match condition for enumerables
  • #1491 Issue with One to Many mappings in 5.0.2
  • #1490 Allow overriding the global ignore; fixes #1488
  • #1489 Handles the case when the resolver doesn't directly implement the res…
  • #1488 Broken changes in 5.0.2; AddGlobalIgnore cannot be overriden by specific mapping configuration
  • #1487 Configuration definition raises ArgumentNullReference in 5.0.2
  • #1486 Problem with mapping DTOs onto their POCO class in 5.02
  • #1357 AfterMap()/BeforeMap() getting invoked multiple times
  • #925 NotSuportedException when mapping entities with complex types using AutoMapper and Entity Framework

Where to get it

You can download this release from nuget

5.0.2

07 Jul 18:48
Compare
Choose a tag to compare

Fixed NuGet problem for UWP apps

5.0.1

07 Jul 15:03
Compare
Choose a tag to compare

As part of this release we had 60 issues closed.

Features

Improvements

  • #1466 Validating constructor mapping as part of configuration validation
  • #1457 AutoMapper 5.0.0 introduces runtime errors that AssertConfigurationIsValid doesn't catch
  • #1456 AutoMapper fails to map class with non-default constructor
  • #1452 Open generics allow any member configuration; removed a ton of dead c…
  • #1451 Inheriting resolvers from base maps
  • #1450 Adding back in destinations for value resolvers; Added new member val…
  • #1445 Restoring destination value in type converters
  • #1444 ResolveUsing<> not being inherited by IncludeBase<>
  • #1415 Better error message
  • #1412 Avoid boxing when calling before/after map actions
  • #1411 Restoring easy static config validation
  • #1392 Update copyright year in readme

Bugs

  • #1478 Fixing pack options to include PDBs and XML docs
  • #1476 If all we got from the constructor was a default value, try property …
  • #1475 Bug: Ctor with default values overrides mapped values (Automapper 5.0.0)
  • #1473 Bug: AutoMapper 5.0 nuget doesn't contain xml files with documentation
  • #1471 Fixes #1469; Removed not needed accessor code
  • #1470 Correctly setting null type for allowing null collections
  • #1469 Null flattening has changed in 5.0
  • #1468 Using the resolve value expression to determine how to map member ins…
  • #1467 ArgumentException when mapping from IEnumerable to T[] when AllowNullCollections is on
  • #1463 Map only the dynamic members necessary
  • #1458 Fixes #1453
  • #1453 Mapper.Initialize throw ArgumentNullException
  • #1437 ProjectTo stack overflow
  • #1434 Fixes #1417
  • #1433 5.0.0 - AutoMapper.QueryableExtensions Project fails when source and destination contain MS-SQL timestamp
  • #1430 Expando object bug
  • #1429 Create missing map circular reference
  • #1427 Calling ForMember with open generics throws NullRef
  • #1423 On .NET Core, Length is not a property of string[] for example; a bug…
  • #1422 StackOverflowException related to CreateMissingTypeMaps and AddConditionalObjectMapper
  • #1421 Make Condition like pre-condition with IfThen
  • #1418 Can't map between Lists
  • #1417 Not all members are being mapped
  • #1413 Conditional Mapping Issue (vers 5.0)
  • #1402 Catch NRE in MapFrom; closes #1382
  • #1401 IfNullVisitor memory leak
  • #1400 Fixes #1380
  • #1397 Closes #1389
  • #1396 Fixes #1394
  • #1394 Automapper 5.0.0 can map flags enum to nullable flags enum
  • #1393 Can't configure mapping where source and destination have byte[] properties
  • #1391 Preferring type map even if a mapper matches for property maps
  • #1389 This operation is only valid on generic types
  • #1388 Explicit dependencies
  • #1385 Fixed all sorts of nuget problems
  • #1384 CreateMissingTypeMaps sets properties of complex objects to null
  • #1382 MapFrom not applying Null Checking all of the way in 5.0
  • #1381 Fixes #1379
  • #1380 Additional Type Checks still run after ConvertUsing in 5.0
  • #1379 ITypeConverter from int/int? to bool throws exception in 5.0 but works in 4.2.1
  • #1378 Complex mapping fails in 5.0
  • #1352 UseAsDataSource StackOverflow Error
  • #1342 Map Automatic Property to ExpandoObject causes many k__BackingField member
  • #1131 Automapper fails when using .NET Native - Part 2

Where to get it

You can download this release from nuget