Apps72.Dev.Data 4.2.4

This DatabaseCommand is a set of components helping C# developers to execute SQL Queries and to retrieve data from SQL Server, Oracle, SQLite, ... It is a light and pragmatic framework that contains only the essential classes needed to create SQL query strings, define parameters and transaction, and execute it to retrieve all data converted in typed objects.

Install-Package Apps72.Dev.Data -Version 4.2.4
dotnet add package Apps72.Dev.Data --version 4.2.4
<PackageReference Include="Apps72.Dev.Data" Version="4.2.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Apps72.Dev.Data --version 4.2.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DatabaseCommand - Simple Object Mapping


Go to https://apps72.com to learn how to use DatabaseCommand.


Last build status: Build status

Introduction

This C# library simplify SQL Queries to external databases, using the standard class DbConnection and DotNetCore.
You can use this library to retrieve data from SQL Server, Oracle Server, 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)

Samples

DatabaseCommand - Simple Object Mapping


Go to https://apps72.com to learn how to use DatabaseCommand.


Last build status: Build status

Introduction

This C# library simplify SQL Queries to external databases, using the standard class DbConnection and DotNetCore.
You can use this library to retrieve data from SQL Server, Oracle Server, 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)

Samples

Release Notes

https://github.com/Apps72/Dev.Data#ReleaseNotes

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
4.2.4 58 10/7/2020
4.2.3 106 10/1/2020
4.2.2 46 9/23/2020
4.2.1 99 9/21/2020
4.2.0 55 9/18/2020
4.1.2 114 9/16/2020
4.1.1 276 3/18/2020
4.1.0 111 3/5/2020
4.0.2 167 1/15/2020
4.0.1 114 1/13/2020
4.0.0 111 12/29/2019
3.0.3 282 4/21/2019
3.0.2-rc2 173 3/28/2019
3.0.1-rc1 166 3/12/2019
3.0.1-beta 185 3/5/2019
2.7.5 362 8/9/2018
2.7.3 337 7/20/2018
2.6.0 446 6/14/2018
2.5.0 437 2/11/2018
2.4.0 417 8/27/2017
2.3.2 414 7/24/2017
2.3.1 405 7/4/2017
2.3.0 410 6/23/2017
2.3.0-beta 384 6/23/2017
2.1.0 510 12/17/2016
2.0.0 459 10/10/2016
1.5.2 591 3/30/2016
1.5.1 490 3/14/2016
1.5.0 481 3/14/2016
1.4.0 524 1/30/2016
1.3.0 678 1/4/2016
1.2.0 836 12/13/2015