Partager via


New Sample Published: ObjectDataReader

I just published a new sample in the MSDN sample gallery:  ObjectDataReader.  This is an update of an older sample (EntityDataReader) that is an IDataReader adapter for object collections.  This is useful primarily for bulk loading SQL Server from a collection of .NET objects.

ObjectDataReader is intended to be simple and fast.  It uses dynamically-compiled expressions to access the object properties, instead of reflection.  ObjectDataReader differes from the older EntityDataReader primarily by removing support for automatic flattening of related objects in an object graph.  This feature was useful in the early days of Entity Framework, but less so now.  Removing this simplified the code and removed the dependency on Entity Framework.

David