public ObjectMapper(ObjectSchema <T> schema) { _schema = schema; if (!_schema.IsReadonly) { _schema.Compile(); } _propertyValues = new IPropertyValue <T> [schema.FieldMaps().Count]; foreach (FieldMap <T> fieldMap in schema.FieldMaps()) { _propertyValues[schema.IndexOf(fieldMap.Field)] = new PropertyValueForLambda <T>(fieldMap.Expression); } // if (this._schema.Name == null) { BlockExpression be = BlockExpression.Block(Expression.New(typeof(T))); _creator = Expression.Lambda <Func <T> >(be).Compile(); } else { _Type = EntityBuilder.BuilderEntityClass <T>(schema.FieldMaps().Select(x => (FieldMap <T>)x), schema); BlockExpression be = BlockExpression.Block(Expression.New(_Type)); _creator = Expression.Lambda <Func <T> >(be).Compile(); } }