Generics and type inference
Why can't the compiler infer my type of TSource? If I call that mehod I always have to specify it like this It should be possible to call it just like this I am just starting with .NET
Mapper.MapTo<ObjectA, ObjectB>(instance of ObjectA); Mapper.MapTo<ObjectB>(instance of ObjectA); public TDest MapTo<TSource, TDest>(TSource src)
{
var res = _mapper.Map<TSource, TDest>(src);
return res;
}