PeregrineDb
PeregrineDb copied to clipboard
CRUD Extensions for Dapper.Net
PeregrineDb - Lightweight CRUD Extensions for Dapper.Net

PeregrineDb is a small and fast Dapper.Net extension library to perform CRUD statement with POCO models.
Project aims
- Provide fast and lightweight CRUD extensions for Dapper
- Should be able to run against multiple different databases in the same project
- Thread safety should be guarenteed
I was using the fantastic Dapper.SimpleCRUD library and found it incredibly easy to use. However, two things drove me to write this library - I have a project which uses SqlServer and Postgres databases side-by-side, and unfortunately Dapper.SimpleCRUD does not support this. Second, I found it was missing a few crucial optimizations which was doubling the time taken to easily insert many rows.
DBMS Support
Currently, the following DBMS are supported. More will be added (e.g. SQLite) when there is demand for them:
- Microsoft SqlServer 2012 and above
- PostgreSQL
Features
- Getting Started
- CRUD Methods
- Creating: Insert one or many entities, with or without generating a primary key.
- Counting: Count how many entities match some conditions
- Reading an Entity: Many overloads for searching for a single entity.
- Reading many Entities: Search for any number of entities matching arbitrary conditions. Includes pagination.
- Updating: Update one or many entities, matched on primary key
- Deleting: Delete one, many or all entities
-
Testing your code
- DataWiper
- Contributing
Don't forget, for practical examples of usage, you can also browse our extensive unit tests suite.
Comparison
NB: These may not be correct nor up-to-date. I made this comparison very quickly
Library | Operations | Composite Keys | Async | .Net Core | Notes |
---|---|---|---|---|---|
PeregrineDb | Count Find/Get Get(Range/All) GetPage Insert(Range) Update(Range) Delete(Range/All) |
:heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
Dapper.Contrib | Get GetAll Insert Update Delete(All) |
:heavy_check_mark: | :heavy_check_mark: |
|
|
Dapper.Extensions | Get Insert Update Delete GetList GetPage/GetSet Count |
:heavy_check_mark: |
|
||
Dapper.FastCRUD | Insert Get Find(Equivalent to GetRange) (Bulk)Update (Bulk)Delete Count |
:heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
Dapper.SimpleCRUD | Get GetList GetListPaged Insert Update Delete(List) RecordCount |
:heavy_check_mark: |
|
Installation
Simply add the nuget package PeregrineDb to your project.
Licensing and Attribution
This project can be used and distributed under the MIT License.
Please read Notice for licenses of other projects used by or inspirations of this projects.