DbToJson 1.1.1

dotnet add package DbToJson --version 1.1.1                
NuGet\Install-Package DbToJson -Version 1.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DbToJson" Version="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DbToJson --version 1.1.1                
#r "nuget: DbToJson, 1.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DbToJson as a Cake Addin
#addin nuget:?package=DbToJson&version=1.1.1

// Install DbToJson as a Cake Tool
#tool nuget:?package=DbToJson&version=1.1.1                

Getting Started

Once installed, DbToJson needs just few steps to work.

  1. Make sure DLL exist in references
  2. Add section DbToJson to the project's configuration file, like below:
<configuration>
    <configSections>
        <section name="DbToJson" type="System.Configuration.AppSettingsSection"/>
    </configSections>
    <connectionStrings>
        <add name="Test" connectionString="..." providerName="System.Data.SqlClient" />
    </connectionStrings>
    <DbToJson>
        <add key="ConnectionString" value="Test" />
    </DbToJson>
</configuration>

Query

It builds up the interaction with database and return the expected result. The constructor awaits these two parameters:

  • text, equals to the stored procedure's name or SQL text of the query
  • isSp, by default to true, can be overrided when you want to execute SQL text
Query query = new Query("GetUsers", new JsonService());

Core

It is the singleton class that communicate with database. Expose the following methods:

  • GetObject
  • GetObjectList
  • GetPrimitive
  • Exec
Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.1 599 11/11/2019
1.1.0 585 11/7/2019 1.1.0 is deprecated.
1.0.3 678 7/12/2019 1.0.3 is deprecated.

Added support for primitive types