I have read much about lambda,expression trees amd sort of compiled stuff... now where I am confused I would like to know wether there exist a faster method to get the Name of Properties to read and write values like this with Reflection:
PropertyInfo[] propertyInfo = item.GetType().GetProperties();
foreach(var item in propertyInfo)
Is there a better method not using slow reflection to read/write all properties of a type for a DataTable to List sort of ORMapper ?
You only need to get the property names and setters once. So that's not performance critical. Then you build an expression tree that calls the setters and compile it.
Finally on each record you call the compiled expression tree which is fast.