using System.Data;
using System.Dynamic;

namespace SattelitePkgTest
{
    public static class DataRowExt
    {
        public static dynamic ToDynamic(this DataRow dr)
        {
            dynamic dinamico = new ExpandoObject();
            foreach (DataColumn dc in dr.Table.Columns)
                ((IDictionary<string, object>)dinamico)[dc.ColumnName] = dr[dc];
            return dinamico;
        }
    }
}
