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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Getting Started
Once installed, DbToJson needs just few steps to work.
- Make sure DLL exist in references
- 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 queryisSp
, 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 | Versions 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.
-
- Newtonsoft.Json (>= 12.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added support for primitive types