I run code bellow, result1 is equal "" but string.Join(",", null) throw an exception
string str = null;
var result1 = string.Join(",", str);
var result2 = string.Join(",", null);
Also it doesn't work for this code(throw an exception)
.ForMember(dst => dst.Ids, opt => opt.MapFrom(string.Join(",", src.Ids)))
But works for this:
.ForMember(dst => dst.Ids, opt => opt.MapFrom(src => src.Ids == null ? null : string.Join(",", src.Ids)))
How explain this behaviour?