Link Search Menu Expand Document


A class that is being used to map a class handler into a class. This class is used as an alternative to the ClassHandler attribute.

Please see the IClassHandlerMapper for more details about the property handling implementation.


Below is the list of methods.

AddAdds a class handler mapping on a specific class.
ClearClears all the existing property handler mappings.
GetGets the existing mapped class handler object on the class.
RemoveRemoves the existing mapped class handler of the class.


Let us say you had implemented a Person handler like below.

public class PersonClassHandler : IClassHandler<Person>
    public Person Get(Person entity, ClassHandlerGetOptions options)
        return entity;

    public Person Set(Person entity, ClassHandlerSetOptions options)
        return entity;

How to Map?

There are various ways of mapping a class handler into an entity model. You can use either do the following approach.

Via the ClassHandlerMapper class.

    .Add(typeof(Person), new PersonClassHandler(), true);

Or, via the FluentMapper class.


Or, via an explicit ClassHandler attribute.

publi class Person