2024年3月21日发(作者:)

return dt;

}

public static IEnumerable SqlQuery(this DatabaseFacade facade, string sql, params object[] parameters) where T : class, new()

{

DataTable dt = SqlQuery(facade, sql, parameters);

return erable();

}

public static IEnumerable ToEnumerable(this DataTable dt) where T : class, new()

{

PropertyInfo[] propertyInfos = typeof(T).GetProperties();

T[] ts = new T[];

int i = 0;

foreach (DataRow row in )

{

T t = new T();

foreach (PropertyInfo p in propertyInfos)

{

if (f() != -1 && row[] != )

ue(t, row[], null);

}

ts[i] = t;

i++;

}

return ts;

}

}

}

View Code

更多: