Dapper.FastCrud
1.1.1
See the version list below for details.
dotnet add package Dapper.FastCrud --version 1.1.1
NuGet\Install-Package Dapper.FastCrud -Version 1.1.1
<PackageReference Include="Dapper.FastCrud" Version="1.1.1" />
paket add Dapper.FastCrud --version 1.1.1
#r "nuget: Dapper.FastCrud, 1.1.1"
// Install Dapper.FastCrud as a Cake Addin #addin nuget:?package=Dapper.FastCrud&version=1.1.1 // Install Dapper.FastCrud as a Cake Tool #tool nuget:?package=Dapper.FastCrud&version=1.1.1
Fast Dapper CRUD extensions added to the IDbConnection for convenience and a less error prone experience. This library is 2x faster than Dapper.SimpleCRUD.
For Dapper constructs in general, it is recommended to use Visual Studio 2015 for features such as nameof and string interpolation but that's not a requirement.
The package contains .NET 4.5 and 4.6 DLLs, one of which will be installed based on the target framework in your project.
For .NET 4.5, the code contains the polyfills for the missing FormattableString class, which is required when targetting that framework version and using string interpolation with the C# 6 compiler in VS 2015.
Features:
----------
- Support for LocalDb, Ms Sql Server, MySql, SqLite, PostgreSql
- Entities having composite primary keys are supported
- All the CRUD methods accept a transaction and a command timeout
- Fast pre-computed entity queries
- A generic T4 template is also provided for convenience. Entity domain partitioning and generation can be achieved via separate template configurations.
Existing POCO entities are also supported which can be decorated with attributes such as Table, Key and DatabaseGenerated.
Column name overrides are not supported and not recommended. As you'll end up writing more complex SQL queries, outside of the domain of this library, you'll want to use the nameof operator as much as possible.
Examples of usage:
-------------------
- DapperExtensions.Dialect = SqlDialect.MsSql | MySql | SqLite | PostgreSql
- dbConnection.Insert(newEntity);
- dbConnection.Get()
- dbConnection.Get(new Entity() {Id = 10});
- dbConnection.Update(updatedEntity);
- dbConnection.Delete(entity)
- dbConnection.GetTableName<Entity>()
- dbConnection.Find<Entity>(
whereClause:$"{nameof(Entity.FirstName)}=@FirstNameParam",
orderClause:$"{nameof(Entity.LastName)} DESC",
skipRowsCount:10, limitRowsCount:20,
queryParameters: new {FirstNameParam: "John"});
This is where the power of the C# 6 compiler comes into play, and leaves no chance to mistypings or to problems arising from db entity refactorings.
More details and benchmarks are available on the project site.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Dapper (>= 1.38.0)
NuGet packages (15)
Showing the top 5 NuGet packages that depend on Dapper.FastCrud:
Package | Downloads |
---|---|
CyberEye.Common.Lib
Package chứa các hàm tiện ích và common |
|
Smooth.IoC.Dapper.Repository.UnitOfWork
The package Provides a solution for the Repository and UnitOfWork patterns together with inversition of control. On the project site there are examples of Autofact, Castle.Windsor, Ninject, Simpleinjector, StructureMap, and Unity integration. The IoC framework is not an issue... It is ment to integrate nice and smooth like... The project uses tor its repository work Dapper as ORM and Dapper.FactCRUD for fluentness. But you can use is as a foundation and with any IDbConnection and IDbTransient framework you like. The library gives you the building blocks to: * Create Sessions from the IDbFactory in your methods, IDbFactory should be injected into your class's. As Session extends IDbConnection and will Open on the factory spawning the session and dispose the connection on disposal of the connection. * Your Sessions can create UnitOfWork's. As Session extends IDbConnection and will Open on the factory spawning the session and dispose the connection on disposal of the connection. * If your logic just needs "just a" UnitOfWork with a session that has the same scope, the factory can create it for you. * The IRepository and abstract concrete class should be used on your individual repository classes to provide simple and basic calls. But ofcasue you can add all the queries you want into your Repositories and use the dapper and dapper.FastCRUD (or any other extensions) functionality provided to you. * The repository abstract classes use Dapper.FastCRUD to give you a fluent ORM experience with the most common calls. * This library does not lock you to using dapper and FastCRUD, you can use any library you like that extends IDbConnection and IDbTransation, and still use the IDbFactory, ISession and IUnitOrWork. * Implemented for .net 4..0, .net 4.5.2, .net 4.6.1, .net 4.7.1+, .net 1.6 standard, .net 2.0 standard+. |
|
Tolitech.Modules.Base.Data
Biblioteca base para a camada Data. Esta é uma biblioteca utilizada em todos os projetos Tolitech, inclusive os gerados pela ferramenta Code Generator. Mais informações em http://www.codegenerator.com.br/ |
|
wallet.lib.dapper
add transaction scope demo |
|
Proactive.DataRepository
Proactive data repository NetStandard package. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.3.2 | 35,788 | 6/3/2024 |
3.3.1 | 180 | 6/3/2024 |
3.2.2 | 252 | 5/31/2024 |
3.1.46 | 222,641 | 3/9/2023 |
3.0.46 | 299,163 | 3/2/2022 |
3.0.45 | 4,620 | 2/22/2022 |
2.6.7 | 91,821 | 1/18/2022 |
2.5.0.39 | 1,062,321 | 4/19/2018 |
2.4.1 | 324,982 | 10/27/2016 |
2.4.0 | 8,653 | 9/21/2016 |
2.3.2 | 11,413 | 2/9/2016 |
2.3.0 | 2,940 | 1/2/2016 |
2.2.0 | 2,874 | 12/8/2015 |
2.1.2 | 2,648 | 10/30/2015 |
2.1.0 | 2,688 | 9/18/2015 |
2.0.0 | 3,379 | 6/1/2015 |
1.1.1 | 2,324 | 5/21/2015 |
1.1.0 | 2,435 | 5/21/2015 |
1.0.2 | 3,361 | 5/18/2015 |
1.0.1 | 2,631 | 5/16/2015 |
1.0.0 | 2,369 | 5/16/2015 |
Added support for PostgreSql dialect.