I'm trying to learn c# at work and I'm not really sure how to use Automapper at the same time. There is this extension method that is being used other areas of the site. I tried to use it on another C# class.
public static TResult MapTo<TResult>(this object self)
{
if (self == null)
throw new ArgumentNullException();
return (TResult)Mapper.Map(self, self.GetType(), typeof(TResult));
}
I get the exception "An exception of type 'AutoMapper.AutoMapperMappingException' occurred in AutoMapper.dll but was not handled in user code." Then when I look at the inner exception it says, "Trying to map BlahEntity to BlahResponse." I'm not really sure how to go about debugging this. Any thoughts? Thanks in advance.