public PropertyPart Map <TProperty>(string key) { var property = new DummyPropertyInfo(key, typeof(TProperty)); var propertyMap = new PropertyPart(property.ToMember(), typeof(T)); properties.Add(propertyMap); return(propertyMap); }
/// <summary> /// Map a property /// </summary> /// <param name="key">Dictionary key</param> /// <typeparam name="TProperty">Property type</typeparam> /// <example> /// Map<int>("Age"); /// </example> public PropertyBuilder Map <TProperty>(string key) { var property = new DummyPropertyInfo(key, typeof(TProperty)); var propertyMapping = new PropertyMapping(); var builder = new PropertyBuilder(propertyMapping, typeof(T), property.ToMember()); properties.Add(new PassThroughMappingProvider(propertyMapping)); return(builder); }