This is what Entity Framework prohibits, not AutoMapper. Simply by using your mapping setup, AutoMapper creates a
to the underlying query provider using LINQ expression.
Since Entity Framework is the underlying query provider in your scenario, it should come as no surprise that Entity Framework is unable to transform any given method into SQL. Only a few methods, including Count, Sum, and a few string/DateTime/primitive ones, are understood by EF.
So the exception message is quite accurate - EF doesn't understand this method you've given it, and therefore has no way to translate that method to SQL.
However, if you look at the Package AutoMapper.EF6, there may be hope. It contains the
package that analyses your method's behaviour using IL inspection, decompiles it, and then passes the result as an expression to the query provider.
If it seems difficult, it probably is, so before continuing, you should really have a firm grasp of how LINQ works.