Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

Chloe

> 数据库
Open source

A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#

1.5K stars0 likes0 views
WebsiteGitHub

About

A lightweight and high-performance Object/Relational Mapping(ORM) library for .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
 */

GitHub Issues· 23 open

View all on GitHub
  • #432

    是否能升级支持Json 和Jsonb类型的数据操作

    Updated Aug 31, 2026
  • #430

    Sharding 是否可以支持include 和ThenInclude

    Updated Jul 27, 2026
  • #330

    分库分表的使用

    questionUpdated Jun 7, 2026
  • #429

    建议优化 VisitCoalesce 方法中的 SQL 生成逻辑

    Updated Jun 5, 2026
  • #426

    强烈建议群主实现这样的Update

    Updated May 4, 2026
  • #428

    支持Union或者Union ALL?

    Updated Apr 17, 2026
  • #425

    .net10下,LINQ问题

    Updated Mar 29, 2026
  • #422

    .net10下,Where中 ids.Contains(w.Id)条件会报错,.net9及更低版本没问题

    Updated Dec 10, 2025
  • #424

    SeekDb考虑添加吗?

    Updated Dec 2, 2025
  • #408

    关于支撑空间类型

    Updated May 10, 2025

Highlights

  • •DbContext
  • •Join Query
  • •Group Query
  • •Sql Query
  • •Aggregate Query
  • •DELETE [Users] WHERE [Users].[Id] = 1
  • •DELETE [Users] WHERE [Users].[Gender] IS NULL
  • •Int32 @P_0 = 1;

> Tags

C#c-sharpchloedamengdotnet

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

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