Dapper.FastCRUD alternatives and similar packages
Based on the "ORM" category.
Alternatively, view Dapper.FastCRUD alternatives based on common mentions on social networks and blogs.
-
TypeORM
ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms. -
Dapper
Dapper - a simple object mapper for .Net [Moved to: https://github.com/DapperLib/Dapper] -
Entity Framework
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. -
SqlSugar
.Net aot ORM Fastest ORM Simple Easy Sqlite orm Oracle ORM Mysql Orm postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping -
FreeSql
🦄 .NET aot orm, C# orm, VB.NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, 虚谷 orm, 国产 orm, Clickhouse orm, QuestDB orm, MsAccess orm. -
EFCore.BulkExtensions
Entity Framework EF Core efcore Bulk Batch Extensions with BulkCopy in .Net for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, MySQL, SQLite -
PetaPoco
Official PetaPoco, A tiny ORM-ish thing for your POCO's -
ServiceStack.OrmLite
Fast, Simple, Typed ORM for .NET -
Dapper Extensions
Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance. -
Entity Framework 6
This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore. -
Massive
A small, happy, dynamic MicroORM for .NET that will love you forever. -
LINQKit
LINQKit is a free set of extensions for LINQ to SQL and Entity Framework power users. -
NPoco
Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco -
SmartSql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics -
MicroOrm.Dapper.Repositories
CRUD for Dapper -
SQLProvider
A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides. -
LINQ to Twitter
LINQ Provider for the Twitter API (C# Twitter Library) -
MongoDB Repository pattern implementation
Repository abstraction layer on top of Official MongoDB C# driver -
MongoDB.Entities
A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management -
JsonFlatFileDataStore
Simple JSON flat file data store with support for typed and dynamic data. -
MongoFramework
An "Entity Framework"-like interface for MongoDB -
LINQtoCSV
Popular, easy to use library to read and write CSV files. -
DbExtensions
Data-access framework with a strong focus on query composition, granularity and code aesthetics. -
NReco.Data
Fast DB-independent DAL for .NET Core: abstract queries, SQL commands builder, schema-less data access, POCO mapping (micro-ORM). -
Venflow
A brand new, fast and lightweight ORM, build for PostgreSQL. -
EntityFrameworkCore.SqlServer.SimpleBulks
Very simple .net library that supports bulk insert (retain client populated Ids or return db generated Ids), bulk update, bulk delete and bulk merge operations. Lambda Expression is supported. -
Linq.Expression.Optimizer
System.Linq.Expression expressions optimizer. http://thorium.github.io/Linq.Expression.Optimizer -
KonfDB
Configuration as a Service for multi-tenant, cross-platform applications -
Dashing
Dashing is a simple to use mini ORM built on top of Dapper -
MapDataReader
Super fast mapping DataReader to strongly typed object, Using AOT source generator. -
ObjectStore
.Net Or-Mapper working with dynamically implemented abstract Classes -
MongoRiver.NET
A library for writing .NET MongoDB oplog tailers. -
EntityFramework.DatabaseMigrator
EntityFramework.DatabaseMigrator is a WinForms utility to help manage Entity Framework 6.0+ migrations. -
Excel2SqlServer
Library for importing Excel spreadsheets into SQL Server tables
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Dapper.FastCRUD or a related project?
README
You hate verbatim SQL queries with zero type safety for your code but you love their speed? Dapper.FastCrud
is a fast orm built around essential features of the C# 6 / VB 14 that have finally raised the simplicity of raw SQL constructs to acceptable maintenance levels. These features leave no chance to mistypings or problems arising from db entity refactorings.
Visual Studio 2019 and above is recommended.
What to expect when working with Dapper.FastCrud in the DAL?
Type safety, clean code, less prone to errors, more peace of mind, while still being close to the metal. Here's a sample for 3.0:
var queryParams = new
{
FirstName = "John",
Street = "Creek Street"
};
var persons = dbConnection.Find<Person>(statement => statement
.WithAlias("person")
.Include<Address>(join => join.InnerJoin()
.WithAlias("address"))
.Where($@"
{nameof(Person.FirstName):of person} = {nameof(queryParams.FirstName):P}
AND {nameof(Address.Street):of address} = {nameof(queryParams.Street):P}")
.OrderBy($"{nameof(Person.LastName):of person} DESC")
.Skip(10)
.Top(20)
.WithParameters(queryParams);
Features:
- Support for LocalDb, Ms Sql Server, MySql, SqLite, PostgreSql.
- Entities having composite primary keys are supported, however note that the CRUD operations only support UNIQUE primary keys.
- Multiple entity mappings are supported, useful for partial queries in large denormalized tables and data migrations between different database types.
- All the CRUD methods accept a transaction, a command timeout, and a custom entity mapping.
- Fast pre-computed entity queries for simple CRUD operations.
- Compatible with component model data annotations.
- Opt-in relationships. As of 3.0, self referenced entities and multiple joins to the same target are also supported via aliases.
- A set of "formattables" are also included, which can be used even if you don't need the CRUD features of this library but you want to take advantage of the DB mappings.
- A generic T4 template for C# is also provided for convenience in the NuGet package Dapper.FastCrud.ModelGenerator.
- The following mapping styles are supported:
- Database first (limited to SQL Server)
- Code first, using model data annotations (preferred)
- Fluent registration for POCO objects
- Semi-POCO using metadata objects
Active Versions
- 3.0 Check the release notes for information about the recent changes or the readme info published on NuGet.
WIKI
The wiki is a great place for learning more about this library.
Speed
Let's have a look at some popular ORMs out there and benchmark their speed:
Dapper.SimpleCRUD v2.3.0
DapperExtensions v1.6.3
Entity Framework Core v6.0.2
Automatic Benchmark Report (Last Run: Wednesday, February 16, 2022)
Library | Operation | Op Count | Time (ms) | Time/op (μs) |
---|---|---|---|---|
Dapper | insert | 10000 | 2,974.40 | 297.44 |
Fast Crud | insert | 10000 | 3,172.67 | 317.27 |
Dapper Extensions | insert | 10000 | 3,529.16 | 352.92 |
Simple Crud | insert | 10000 | 3,110.40 | 311.04 |
Entity Framework - single op/call | insert | 10000 | 119,784.63 | 11,978.46 |
Dapper | update | 10000 | 3,319.82 | 331.98 |
Fast Crud | update | 10000 | 3,276.99 | 327.70 |
Dapper Extensions | update | 10000 | 3,657.30 | 365.73 |
Simple Crud | update | 10000 | 3,150.76 | 315.08 |
Entity Framework - single op/call | update | 10000 | 235,678.77 | 23,567.88 |
Dapper | delete | 10000 | 2,869.64 | 286.96 |
Fast Crud | delete | 10000 | 2,916.99 | 291.70 |
Dapper Extensions | delete | 10000 | 3,106.24 | 310.62 |
Simple Crud | delete | 10000 | 3,120.13 | 312.01 |
Entity Framework - single op/call | delete | 10000 | 7,326.03 | 732.60 |
Dapper | select by id | 10000 | 1,499.67 | 149.97 |
Fast Crud | select by id | 10000 | 1,861.50 | 186.15 |
Dapper Extensions | select by id | 10000 | 2,026.22 | 202.62 |
Simple Crud | select by id | 10000 | 2,113.70 | 211.37 |
Entity Framework | select by id | 10000 | 3,665.71 | 366.57 |
Dapper | select all | 10000 | 1,449.41 | 144.94 |
Fast Crud | select all | 10000 | 1,748.86 | 174.89 |
Dapper Extensions | select all | 10000 | 1,762.69 | 176.27 |
Simple Crud | select all | 10000 | 2,281.44 | 228.14 |
Entity Framework | select all | 10000 | 6,233.53 | 623.35 |
Dapper is included for reference. All the libs involved get their own internal cache cleared before each run, the benchmark database is re-created, data file gets pre-allocated, and the statistics are turned off.
The tests are following the same steps and are running in the same environment on the same number and size of records.
We're happy to see that most light ORMs have matured enough over the years and caught up with FastCrud
and even exceeded its speed in some cases.
The really heavy ones are still trailing far behind.
You can find more details about how to run the benchmarks yourself in the wiki.