Apps72.Dev.Data.Core
4.0.0
Since the version 3.0, the project was migrated to .NET Standard 2.0.
So, the packages Apps72.Dev.Data.Core and Apps72.Dev.Data are exactly same libraries.
See the version list below for details.
dotnet add package Apps72.Dev.Data.Core --version 4.0.0
NuGet\Install-Package Apps72.Dev.Data.Core -Version 4.0.0
<PackageReference Include="Apps72.Dev.Data.Core" Version="4.0.0" />
paket add Apps72.Dev.Data.Core --version 4.0.0
#r "nuget: Apps72.Dev.Data.Core, 4.0.0"
// Install Apps72.Dev.Data.Core as a Cake Addin #addin nuget:?package=Apps72.Dev.Data.Core&version=4.0.0 // Install Apps72.Dev.Data.Core as a Cake Tool #tool nuget:?package=Apps72.Dev.Data.Core&version=4.0.0
DatabaseCommand - Simple Object Mapping
Go to https://apps72.com to learn how to use DatabaseCommand.
Introduction
This C# library simplify SQL Queries to external databases, using the standard class DbConnection and DotNetCore. Many implementations are compiled for SQL Server, Oracle Server or SQLite.
First, create a SqlConnection or an other DbConnection.
using (var cmd = new DatabaseCommand(mySqlConnection))
{
cmd.CommandText = "SELECT ID, Name FROM EMployee";
var all = cmd.ExecuteTable<Employee>(); // List of all employees
var smith = cmd.ExecuteRow<Employee>(); // First employee
var id = cmd.ExecuteScalar<int>(); // ID of first employee
var emps = cmd.Query(" SELECT * FROM Employee WHERE ID > @ID ")
.AddParameter("@ID", 10)
.ExecuteTable<Employee>();
}
Requirements: Microsoft Framework 4.0 (Client Profile) for desktop applications, or SQL Server 2008 R2 for SQL CLR Stored procedures, or .NET Standard 2.0 for .NET Core library.
Basic Samples (video)
Performances
Performance is very important during development. You can check these values by starting the Performance project in the source code. Comparing to the famous projects Dapper and Entity Framework, you can see that:
- DatabaseCommand has identical performance when executing Scalar queries.
- DatabaseCommand is slightly less efficient than Dapper (35%) but significantly more efficient than EFCore.
This slight reduction of performance is due to all additional features included in DatabaseCommand: management of exceptions, Tags, Logs, ActionBeforeExecution and ActionAfterExecution events.
BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18362
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
------------------------------------------------------------------------------
Execute Scalar | Execute Table
------------------------------------------------------------------------------
Dapper | 80.18 µs | Dapper | 103.88 µs
DatabaseCommand | 81.86 µs +2% | DatabaseCommand | 141.68 µs +36%
EF Core | 342.05 µs +327% | EF Core | 315.30 µs +204%
------------------------------------------------------------------------------
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.0
- System.Data.Common (>= 4.3.0)
-
.NETFramework 4.0
- No dependencies.
-
.NETStandard 2.0
- System.Data.Common (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
4.1.1 | 5,863 | 3/18/2020 | |
4.1.0 | 690 | 3/5/2020 | |
4.0.2 | 1,142 | 1/15/2020 | |
4.0.1 | 669 | 1/13/2020 | |
4.0.0 | 670 | 12/29/2019 | |
3.0.3 | 5,121 | 4/21/2019 | |
3.0.2-rc2 | 610 | 3/28/2019 | |
3.0.1-rc1 | 623 | 3/12/2019 | |
3.0.1-beta | 978 | 3/5/2019 | |
2.8.0-beta | 754 | 12/2/2018 | |
2.7.5 | 1,178 | 8/9/2018 | |
2.7.4 | 1,132 | 7/20/2018 | |
2.7.3 | 1,072 | 7/20/2018 | |
2.7.2 | 1,181 | 7/16/2018 | |
2.7.1 | 1,192 | 7/5/2018 | |
2.7.0 | 1,169 | 7/5/2018 | |
2.6.0 | 1,164 | 6/14/2018 | |
2.5.0 | 1,266 | 2/11/2018 | |
2.4.0 | 1,307 | 8/27/2017 |