A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
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
| 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 |
MIT License
…IDbContext context = new MsSqlContext(DbHelper.ConnectionString);
IQuery<User> q = context.Query<User>();………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();…………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
*/No open issues yet, or sync has not completed.