You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

JSON-ORM

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

JSON-ORM

An ORM based on Models created from JSON returned from SQL Server Sprocs.

6.3.2
Source
nugetNuGet
Version published
Maintainers
1
Created
Source

SQLJSONReader

An extension to read JSON from SQL server off of a SQLCommand to get data. This package is in Nuget as SQLJsonReader

Usage, include using SQLJSON.Extensions; for the use and addition of ExecuteJsonReaderAsync and ExecuteJsonReader to read JSON from SQL Server after a stored procedure call returns JSON using the for JSON.

string result;

using (SqlConnection conn = new SqlConnection(connection))
{
    conn.Open();

    using (var cmd = new SqlCommand(sproc, conn) { CommandType = CommandType.StoredProcedure, 
                                                   CommandTimeout = 600 })
    {
        if (parameters != null)
            cmd.Parameters.AddRange(parameters);

        var reader = await cmd.ExecuteJsonReaderAsync();

        result = await reader.ReadAllAsync();
    }
}

See also Json-Orm Nuget Package which uses this package to process its SQL Server derived json into models.

Keywords

Json

FAQs

Package last updated on 14 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts