Recommended one between lightweight ORM and full-featured ORM open source projects.
01 Project description
RepoDB provides the methods needed for basic operations, as well as advanced features such as second-level caching, tracing, warehousing, attribute processors, and batch/bulk operations. Supported databases, including SqlServer, SQLite, MySql and PostgreSql.
02 Key Features
1、Basic operation support
RepoDB provides the initial methods needed to perform basic database operations such as CRUD operations.
2. Advanced features
Layer 2 cache: used to improve data retrieval efficiency.
Trace: Used to monitor and log database operations.
Warehousing: used to encapsulate database access logic.
Attribute Processor: for custom attribute mapping and transformation.
Batch/bulk operations: for efficient processing of large amounts of data.
3、Development is simple and easy to use
When using RepoDB, developers invoke advanced operations with very little code.
4, batch operation and data model synchronization
When performing batch operations such as BulkInsert and BulkMerge, RepoDB sets the resulting identity columns values back to the data model after execution, satisfying important use case requirements for developers.
5. Multiple implementation support
Supports different execution methods, including atomic, batch and bulk operations.
03 Method of use
1. Insertion of records
//Inserting a single record
var person = new Person
{
Name = "John Doe",
Age = 54,
CreatedDateUtc =
};
using (var connection = new SqlConnection(ConnectionString))
{
var id = (person);
}
//Inserting multiple records
var people = GetPeople(100);
using (var connection = new SqlConnection(ConnectionString))
{
var rowsInserted = (people);
}
2. Query records
//Querying a single record
using (var connection = new SqlConnection(ConnectionString))
{
var person = <Person>(e => == 10045);
}
//Query multiple records
using (var connection = new SqlConnection(ConnectionString))
{
var people = <Person>();
}
3. Updating records
//Updating a single record
var person = new Person
{
Id = 1,
Name = "James Doe",
Age = 55,
DateInsertedUtc =
};
using (var connection = new SqlConnection(ConnectionString))
{
var updatedRows = <Person>(person);
}
//Updating multiple records
var people = GetPeople(100);
people
.AsList()
.ForEach(p => = $"{} (Updated)");
using (var connection = new SqlConnection(ConnectionString))
{
var updatedRows = <Person>(people);
}
4. Deletion of records
//Deleting a single record
using (var connection = new SqlConnection(ConnectionString))
{
var deletedRows = <Person>(10045);
}
//Deleting multiple records
using (var connection = new SqlConnection(ConnectionString))
{
var deletedRows = <Person>();
}
04 Project address
/mikependon/RepoDB
- End -
More open source projects please check:A list focused on recommending excellent .Net open source projects
Recommended Reading
2 zero-based introductory framing tutorials!
A database management tool that can replace Navicat
CSCore: a powerful and flexible open source audio processing library for .
Blazor open source UI simplicity components : 10 popular .Net open source projects recommended !
ExcelDataReader: a . Net high-performance Excel open source reader