-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
Description
I have found a small issue with some mapping between the source and destination in the following example.
using System;
using AgileObjects.AgileMapper;
using System.Collections.Generic;
public class Program
{
public class Source
{
public List<Child> children { get; set; }
public Source()
{
children = new List<Child>
{
new Child {Name = "Mary"},
new Child { Name = "Joe" },
new Child { Name = "Jackie" },
new Child { Name = "John" }
};
}
public ISet<Child> Children()
{
return new HashSet<Child>(children);
}
}
public class Destination
{
public ISet<Child> Children { get; set; }
}
public class Child
{
public string Name { get; set; }
}
public static void Main()
{
var source = new Source();
var mapped = Mapper.Map(source).ToANew<Destination>();
//Console.WriteLine(mapped.Name + ", " + mapped.Age + ", " + mapped.Parent.Name);
}
}
I have worked around it, so this is not a big issue for me.
Thanks,
Gary.