All Versions
17
Latest Version
Avg Release Cycle
97 days
Latest Release
1985 days ago

Changelog History
Page 1

  • v3.0.3

    December 08, 2019
  • v3.0.2 Changes

    June 07, 2018

    โž• added: public static object Map(Type sourceType, Type targetType, object source, object target = null)

    Thanks to: izaruba

  • v3.0.2-beta Changes

    June 07, 2018

    โž• added: public static object Map(Type sourceType, Type targetType, object source, object target = null)

    Thanks to: izaruba

  • v3.0.1 Changes

    October 25, 2017
        public class MapWithStaticFields
        {
            [Fact]
            public void MapStaticFields()
            {
                var source = new SourceStatic();
    
                TinyMapper.Bind<SourceStatic, TargetDto>();
                var actual = TinyMapper.Map<TargetDto>(source);
    
                Assert.Equal(SourceStatic.Id, actual.Id);
                Assert.Equal(SourceStatic.Name, actual.Name);
            }
        }
    
        public class SourceStatic
        {
            public static string Name = "test";
            public static int Id = 1;
        }
    
    
        public class TargetDto
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }
    

    Thanks to Summitn

  • v3.0.1-beta Changes

    October 25, 2017
        public class MapWithStaticFields
        {
            [Fact]
            public void MapStaticFields()
            {
                var source = new SourceStatic();
    
                TinyMapper.Bind<SourceStatic, TargetDto>();
                var actual = TinyMapper.Map<TargetDto>(source);
    
                Assert.Equal(SourceStatic.Id, actual.Id);
                Assert.Equal(SourceStatic.Name, actual.Name);
            }
        }
    
        public class SourceStatic
        {
            public static string Name = "test";
            public static int Id = 1;
        }
    
    
        public class TargetDto
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }
    

    Thanks to Summitn

  • v2.1.4 Changes

    August 18, 2017
    • โž• added support supports circular reference mapping

    Thanks to: sergiorykov, xihu69

                var source = new Node
                {
                    Id = "1",
                    Next = new Node
                    {
                        Id = "2",
                        Next = new Node
                        {
                            Id = "3",
                            Child = new[]
                            {
                                new Node
                                {
                                    Id = " 123 1"
                                },
                                new Node
                                {
                                    Id = "123 2"
                                }
                            }
    
                        }
                    },
                    Child = new[]
                    {
                        new Node
                        {
                            Id = "1 1"
                        },
                        new Node
                        {
                            Id = "1 2"
                        }
                    }
                };
    
                TinyMapper.Bind<Node, Node>();
    
                var target = TinyMapper.Map<Node, Node>(source);
    
                Assert.Equal(source.Id, target.Id);
                Assert.Equal(source.Next.Id, target.Next.Id);
                Assert.Equal(source.Next.Next.Id, target.Next.Next.Id);
                Assert.Equal(source.Next.Next.Id, target.Next.Next.Id);
    
                Assert.Equal(source.Next.Next.Child, target.Next.Next.Child);
    
                Assert.Equal(source.Child, target.Child);
    
  • v2.1.4-beta Changes

    August 18, 2017
    • โž• added support supports circular reference mapping

    Thanks to: sergiorykov, xihu69

                var source = new Node
                {
                    Id = "1",
                    Next = new Node
                    {
                        Id = "2",
                        Next = new Node
                        {
                            Id = "3",
                            Child = new[]
                            {
                                new Node
                                {
                                    Id = " 123 1"
                                },
                                new Node
                                {
                                    Id = "123 2"
                                }
                            }
    
                        }
                    },
                    Child = new[]
                    {
                        new Node
                        {
                            Id = "1 1"
                        },
                        new Node
                        {
                            Id = "1 2"
                        }
                    }
                };
    
                TinyMapper.Bind<Node, Node>();
    
                var target = TinyMapper.Map<Node, Node>(source);
    
                Assert.Equal(source.Id, target.Id);
                Assert.Equal(source.Next.Id, target.Next.Id);
                Assert.Equal(source.Next.Next.Id, target.Next.Next.Id);
                Assert.Equal(source.Next.Next.Id, target.Next.Next.Id);
    
                Assert.Equal(source.Next.Next.Child, target.Next.Next.Child);
    
                Assert.Equal(source.Child, target.Child);
    
  • v2.1.3 Changes

    August 16, 2017
    • ๐Ÿ‘Œ Improved mapping, i.e. now it's possible to map properties from other classes source.Address.Street

              TinyMapper.Bind<PersonDto, Person>(
                  config =>
                  {
                      config.Bind(source => source.Address.Street, target => target.Street);
                      config.Bind(source => source.Address.Phone, target => target.Phone);
                  }
              );
      
  • v2.1.3-beta Changes

    August 16, 2017
    • ๐Ÿ‘Œ Improved mapping, i.e. now it's possible to map properties from other classes source.Address.Street

              TinyMapper.Bind<PersonDto, Person>(
                  config =>
                  {
                      config.Bind(source => source.Address.Street, target => target.Street);
                      config.Bind(source => source.Address.Phone, target => target.Phone);
                  }
              );
      
  • v2.1.2 Changes

    August 14, 2017
    • Collection mapping has been improved

    Before

    Method Mean Error StdDev
    CollectionMapping_AutoMapper 27.753 us 0.1789 us 0.1494 us
    CollectionMapping_TinyMapper 9.594 us 0.0912 us 0.0853 us
    CollectionMapping_Handwritten 3.560 us 0.0709 us 0.0729 us

    After

    Method Mean Error StdDev
    CollectionMapping_AutoMapper 27.696 us 0.5117 us 1.2259 us
    CollectionMapping_TinyMapper 6.765 us 0.0660 us 0.0618 us
    CollectionMapping_Handwritten 3.521 us 0.0387 us 0.0343 us