Here is my scenario. I have a class, Class1, with a property of type string[]
Class Class1
{
string[] strings{ get; set;}
}
and I want to map each string in the list to a string property within a list of type MyClass.
Class MyClass
{
string someString { get; set;]
}
So, using automapper it would be something like this
Mapper.CreateMap<Class1, IEnumerable<MyClass>>().ForMember(dest => dest.someString, opts => opts.MapFrom(src => src.strings));
I know this won't work but I would imagine it would be something list this. I am not really sure where to go from here or if it is even possible any help would be greatly appreciated.