Skip to content

Bug: The property handler mapping via FluentMapper or PropertyHandlerMapper is not being triggered. #438

@mikependon

Description

@mikependon

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdeployedFeature or bug is deployed at the current releasefixedThe bug, issue, incident has been fixed.priorityTop priority feature or things to dotodoThings to be done in the future

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions