Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // example 1: how we currently do it
- public class ClassMap<T>
- {
- private List<PropertyPart> propertyParts = new List<PropertyPart>();
- public PropertyPart Map(...)
- {
- var part = new PropertyPart(...);
- propertyParts.Add(part);
- return part;
- }
- public ClassMapping GetMapping()
- {
- var mapping = new ClassMapping();
- foreach (var propertyPart in propertyParts)
- {
- var propertyMapping = propertyPart.GetMapping();
- mapping.AddProperty(propertyMapping);
- }
- return mapping;
- }
- }
Add Comment
Please, Sign In to add comment