接上次,考虑到转DataTable实际性能问题,我把本地LINQ复杂对象不转成DataTable,仅去掉中间的复杂对象.
这样List<TEntity>就可以在WebService中传递了.同样抛砖引玉:-)
1
public static List<TEntity> ToGeneralList<TEntity>(this IList<TEntity> list) where TEntity : IMyCustomObject
2
}
2
实际转换102000条数的表[12列.含三个复杂对象],设置所需时间106毫秒.