When creating a property handler and you used either of the FluentMapper.Entity<T>() or PropertyHandlerMapper.Add<TEntity, TPropertyHandler>() , then the mapping is not being triggered.
Property Handler:
public class StringToGuidPropertyHandler : IPropertyHandler<string, Guid>
{
public Guid Get(string input, ClassProperty property)
{
var output = Guid.Empty;
Guid.TryParse(input, out output);
return output;
}
public string Set(Guid input, ClassProperty property)
{
return input.ToString();
}
}
Class Model:
public class Customer
{
public Guid Id { get; set; }
public string Name { get; set; }
}
Mapping:
FluentMapper.Entity<Customer>()
.PropertyHandler<StringToGuidPropertyHandler>(e => e.Id);
Upon investigation, the issue is on the compiler level and that needs to be fixed there.
When creating a property handler and you used either of the
FluentMapper.Entity<T>()orPropertyHandlerMapper.Add<TEntity, TPropertyHandler>(), then the mapping is not being triggered.Property Handler:
Class Model:
Mapping:
Upon investigation, the issue is on the compiler level and that needs to be fixed there.