我正在使用自动映射器,并且出现
之类的错误System.NullReferenceException at lambda_method(Closure,Employee)在
.lambda_method(System.Runtime.CompilerServices.Closure,Employee)
我的代码是
.ForMember(d => d.Name, opt => opt.MapFrom(o => o.Name))
.ForMember(d => d.City, opt => opt.MapFrom(o => o.City))
.ForMember(d => d.Phone, opt => opt.MapFrom(o => o.PhoneNo))```