1

I've updated AutoMapper from 4.2.x to 6.2.0.

I'm getting some breaking syntax compiler errors:

this.CreateMap<ActDTO, Act>()
    .ConstructUsing((Func<AutoMapper.ResolutionContext, Act>)(ctx => new Act()))
    .ForMember(
    //...;

I'm getting this message:

Argument 1: cannot convert from 'System.Func<AutoMapper.ResolutionContext, Act>' 
    to 'System.Func<ActDTO, Act>'.

Any ideas?

Jordi
  • 20,868
  • 39
  • 149
  • 333
  • The error is telling you what the problem is. Your first type argument is wrong. Why don't you simply remove the entire cast? –  Nov 13 '17 at 15:12

0 Answers0