Exemplo n.º 1
0
 public static T GetFirstEntity <T>(this DataSet ds) where T : new()
 {
     if (!ds.IsDataEmpty())
     {
         return(ds.Tables[Manipulation.GetTableName <T>()].Rows[0].ToEntity <T>());
     }
     else
     {
         return(default);
Exemplo n.º 2
0
        public static IList <T> ToList <T>(this DataSet ds) where T : new()
        {
            if (!ds.IsDataEmpty())
            {
                return(ds.Tables[Manipulation.GetTableName <T>()].Rows.OfType <DataRow>().ToList <T>());
            }

            return(null);
        }