Esempio n. 1
0
        public static IList <TTo> Map <TTo>(DataTable table)
        {
            var list = new List <TTo>();

            if (table.Rows.Count == 0)
            {
                return(list);
            }

            var builder = DataRowEntityBuilder.GetBuilder <TTo>(table.Rows[0]);

            foreach (DataRow row in table.Rows)
            {
                list.Add(builder(row));
            }

            return(list);
        }
Esempio n. 2
0
 public static TTo Map <TTo>(DataRow row)
 {
     return(DataRowEntityBuilder.GetBuilder <TTo>(row)(row));
 }