DapperSpFlow 1.0.1

dotnet add package DapperSpFlow --version 1.0.1                
NuGet\Install-Package DapperSpFlow -Version 1.0.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="DapperSpFlow" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DapperSpFlow --version 1.0.1                
#r "nuget: DapperSpFlow, 1.0.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 DapperSpFlow as a Cake Addin
#addin nuget:?package=DapperSpFlow&version=1.0.1

// Install DapperSpFlow as a Cake Tool
#tool nuget:?package=DapperSpFlow&version=1.0.1                

SQL server In your stored procedure called, sch.usp_getClient @ClientId int you are making this call.

SELECT
	*
FROM
	Clients
    WHERE ClientId = @ClientId
FOR JSON PATH, ROOT ('Client')

    SELECT
	*
FROM
	Data1
FOR JSON PATH, ROOT ('Data1')

    SELECT
	*
FROM
FOR JSON PATH, ROOT ('Catalog1')

Then, after install this package. Create a class that represents your sp

    public partial class GetClient : StoredRequest
    {
    	public int ClientId { get; set; }

    	public override bool PreValidate()
    	{
        		return true;
    	}

    	public override bool Validate(IDbConnection db)
    	{
     	   return true;
    	}

    	public override void PostOperate(IDbConnection db)
    	{
    	}

    	public override string GetStoredName()
    	{
        return "sch.usp_getClient";
    	}
    }

In your next layer ( In this case simplified to API)

[HttpGet]
public async Task<IActionResult> GetClient([FromQuery] GetClient request)
{
        List<string> response;
        using (IDbConnection cnx = new SqlConnection("yourconnectionstring"))
        {
            response = await request.ExecAsync(cnx);
        }
        return Ok(response);
}

In your client code

function Call(){
	let request = { ClientId: 1};
	let response = await this.getTransaction("Client/GetClient", request);
	var client = JSON.parse(response[0]).Client[0];
	var dataList = JSON.parse(response[1]).Data1;
	var dataCatalog = JSON.parse(response[2]).Catalog1;
}
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.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
1.0.1 707 4/1/2019
1.0.0 664 1/22/2019