Mapping string-properties

Apr 20, 2012 at 8:38 AM

Hi,

I am working with Umbraco 4.7.1 and I am trying to map the content-nodes to some autogenerated strong typed objects. On an Umbraco node (the cms document) properties are retrieved like this:

node.GetProperty("propertyName").Value;

And my strongly typed objects are in the format of MyObject.PropertyName. So how do I map the property on the node which is retrieved using a method and a string beginning with a lowercase character into a property on MyObject where the property begins with an uppercase character in Emit Mapper ?

I figured out how to do it using ValueInjecter, but would like to improve performance (see http://stackoverflow.com/questions/10204535/mapping-umbraco-node-to-strongtyped-object). And I read somewhere that Emit Mapper might have better performance

Is it possible to use Emit Mapper to map an object where the properties are stored as string to an object with the same properties but as other types ?

Eg.

ObjectA.Price = "54"

ObjectB.Price=54

 

thanks

Thomas