摘要:
public static T GetEntity<T>(DataTable table) where T : new() { T entity = new T(); foreach (DataRow row in table.Rows) { foreach (var item in entity.GetType().GetProperties()) { if (row.Table.Columns.Contains(item.Name)) { if (DBNull.Value != row[item.Name]) { item.SetValue(entity, Convert.Ch 阅读全文