8

C#版本LINQ增强开源库 - chingho

 2 years ago
source link: https://www.cnblogs.com/chingho/p/17291789.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

LINQ对应的中文名称是:语言集成查询,是对一系列直接将查询功能集成到C#语言技术的统称,我们最常用的场景是,用于数据库的查询功能。

在.Net中,本身对Objects也支持LINQ的扩展,但是对于一些特定的功能,就需要我们自己去扩展。

所以,今天给大家推荐一个LINQ扩展库,主要是针对“LINQ to Objects”的扩展。

项目简介

该项目与LINQ规范保持一致,针对Objects进行扩展,总共扩展了100多个方法,功能非常齐全且强大。

项目结构

图片

扩展方法合集

图片

部分使用示例

引用

using static MoreLinq.Extensions.LagExtension;
using static MoreLinq.Extensions.LeadExtension;
using MoreEnumerable = MoreLinq.MoreEnumerable;

随机排序

图片

列表转换为DataTable

图片

判断结尾

图片

LeftJoin / RightJoin

图片

图片

项目地址

https://github.com/morelinq/MoreLINQ

更多开源项目请查看一个专注推荐优秀.Net开源项目的榜单

- End -

文章首发于公众号【编程乐趣】,欢迎大家关注。

图片

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK