public static List <T> ToList <T>(this DataTable dt) where T : new()
    {
        List <T> list = new List <T>();

        foreach (DataRow dr in (InternalDataCollectionBase)dt.Rows)
        {
            list.Add(DataExtensions.ToEntity <T>(dr));
        }
        return(list);
    }