<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>success</status>
  <result>
    <project>
      <id>340541</id>
      <name>modelshredder</name>
      <created_at>2009-05-14T04:23:57Z</created_at>
      <updated_at>2009-08-27T06:06:04Z</updated_at>
      <description>ModelShredder is a class library that can translate Collections implementing IEnumerable into flat DataTables. It is written with extensibility in mind.  

Why would I want to do that?:I started this project while adding printing and reporting capabilities to the LOB Application I am currently working upon. I wanted to have a consistent Interface to the report engine, which API favors using DataSets for data exchange. Once the templates are deployed, it is cumbersome to change them everytime i update my model or rename something.  Via projecting my model into annonymous types, I am able to have this consistent interface while also beeing able to include values returned by functions into my Report Model without having to declare and map to DTOs. 

Another application is when you do need to bind your domain model to a table style view. Projecting your model into annonymous types can help you build a ViewModel. When you bind the resulting collection to a DataGridView it is not sortable. By letting ModelShredder translate it into a DataTable you gain this ability. 

ModelShredder uses dynamically injected IL to do its work. Thats why it outperforms most Generic List Binding solutions by orders of magnitude. 

How it works:ShredderOptions - defines how a type should be shreddered (order and visibility of fields and properties) IShredderOptionsProvider - provides shredder options for a type.  ISchemaBuilder - Builds a DataTable schema according to a ShredderOptions instance. IObjectShredder - Shredders an object into an object array Shredder - Uses the interfaces defined above to shred a IEnumerable collection into a DataTable The key to performance is the InjectionObjectShredder which directly injects MSIL instructions into the Type to shred in order to quickly load each instance of it into a DataRow. 

What you can do with it:var source = from x in p select new {x.Id, x.Name, x.Price, x.Qty, x.LineTotal};
DataGridView.DataSource = source.ToDataTable();Check out the RoadmapPlease do also check out the RoadMap. Feel free to contact me if you have any questions.</description>
      <homepage_url>http://code.google.com/p/modelshredder</homepage_url>
      <download_url></download_url>
      <url_name>modelshredder</url_name>
      <user_count>1</user_count>
      <average_rating></average_rating>
      <rating_count>1</rating_count>
      <analysis_id>684458</analysis_id>
      <analysis>
        <id>684458</id>
        <project_id>340541</project_id>
        <updated_at>2009-12-17T13:18:17Z</updated_at>
        <logged_at>2009-12-17T13:18:13Z</logged_at>
        <min_month>2009-04-01T00:00:00Z</min_month>
        <max_month>2009-04-01T00:00:00Z</max_month>
        <twelve_month_contributor_count>1</twelve_month_contributor_count>
        <total_code_lines>768</total_code_lines>
        <main_language_id>17</main_language_id>
        <main_language_name>C#</main_language_name>
      </analysis>
      <licenses>
        <license>
          <name>lgpl</name>
          <nice_name>GNU Lesser General Public License 2.1</nice_name>
        </license>
      </licenses>
    </project>
  </result>
</response>
