public MapBuilderContextMap(PropertyMapping propertyMapping) { if (null == propertyMapping) { throw new ArgumentNullException("propertyMapping"); } this.propertyMapping = propertyMapping; }
public IMapBuilderContext <TResult> MapProperty <TMember>(Expression <Func <TResult, TMember> > propertySelector, Action <IMapBuilderContextMap> configure) { var property = ExtractPropertyInfo(propertySelector); var mapping = new PropertyMapping(new MappingSource(property, this.mappings.Count)); if (null != configure) { var map = new MapBuilderContextMap(mapping); configure(map); } this.mappings[property] = mapping; return(this); }
public IMapBuilderContext <TResult> MapProperty(PropertyInfo propertyInfo, Action <IMapBuilderContextMap> configure) { if (null == propertyInfo) { throw new ArgumentNullException("propertyInfo"); } var mapping = new PropertyMapping(new MappingSource(propertyInfo, this.mappings.Count)); if (null != configure) { var map = new MapBuilderContextMap(mapping); configure(map); } this.mappings[propertyInfo] = mapping; return(this); }