百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

Chloe

> 数据库
开源

一个轻量级且高性能的对象/关系映射(ORM)库,适用于 .NET --C#

1.5K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个轻量级且高性能的对象/关系映射(ORM)库,适用于 .NET --C#

Chloe(克洛伊)

Chloe is a lightweight Object/Relational Mapping(ORM) library. The query interface is similar to LINQ. You can query data like LINQ and do any things(Join Query | Group Query | Aggregate Query | Insert | Batch Update | Batch Delete | Sharding) by lambda with Chloe.ORM.

Documentation: https://github.com/shuxinqin/Chloe/wiki

NuGet Install Command

Database Install Command
SqlServer Install-Package Chloe.SqlServer
MySql Install-Package Chloe.MySql
Oracle Install-Package Chloe.Oracle
SQLite Install-Package Chloe.SQLite
PostgreSQL Install-Package Chloe.PostgreSQL
达梦 Install-Package Chloe.Dameng
人大金仓 Install-Package Chloe.KingbaseES

License

MIT License

Usage

  • Entity
…
  • DbContext
IDbContext context = new MsSqlContext(DbHelper.ConnectionString);
IQuery<User> q = context.Query<User>();
  • Query
…
  • Join Query
…
  • Group Query
…
  • Sql Query
context.SqlQuery<User>("select Id,Name,Age from Users where Name=@name", DbParam.Create("@name", "lu")).ToList();
context.SqlQuery<int>("select Id from Users").ToList();
  • Aggregate Query
…
  • Method
…
  • Insert
…
  • Update
…
  • Delete
MsSqlContext context = new MsSqlContext(DbHelper.ConnectionString);

context.Delete<User>(a => a.Id == 1);
/*
 * DELETE [Users] WHERE [Users].[Id] = 1
 */

context.Delete<User>(a => a.Gender == null);
/*
 * DELETE [Users] WHERE [Users].[Gender] IS NULL
 */
 
 
User user = new User();
user.Id = 1;
context.Delete(user);
/*
 * Int32 @P_0 = 1;
   DELETE [Users] WHERE [Users].[Id] = @P_0
 */

Issues· 23 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#c-sharpchloedamengdotnet

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库