You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I cannot find any documentation about this apparently easy task.
The situation is this:
public interface IFoo
{
string Name { get; set; }
}
public class FooDto : IFoo
{
public string Name { get; set; }
}
public class Foo
{
public string Name { get; set; }
}
I'm tring to configure the following mappings:
public class FooMappingConfiguration : MapperConfiguration
{
protected override void Configure()
{
GetPlansFor<Foo>().To<FooDto>(); // works
GetPlansFor<IFoo>().To<Foo>(); // works
WhenMapping
.From<Foo>().To<IFoo>()
.MapTo<FooDto>()
;
GetPlansFor<Foo>().To<IFoo>(); // doesn't work!!!
}
}
When I test the mapping plans it gives me the following error:
Sorry, I cannot find any documentation about this apparently easy task.
The situation is this:
I'm tring to configure the following mappings:
When I test the mapping plans it gives me the following error:
I also tried with CreateInstancesOf but the error remains the same.
What am I doing wrong? Any suggestion?
The text was updated successfully, but these errors were encountered: