StoredProcedurePlus.Net 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package StoredProcedurePlus.Net --version 1.0.3                
NuGet\Install-Package StoredProcedurePlus.Net -Version 1.0.3                
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="StoredProcedurePlus.Net" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StoredProcedurePlus.Net --version 1.0.3                
#r "nuget: StoredProcedurePlus.Net, 1.0.3"                
#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 StoredProcedurePlus.Net as a Cake Addin
#addin nuget:?package=StoredProcedurePlus.Net&version=1.0.3

// Install StoredProcedurePlus.Net as a Cake Tool
#tool nuget:?package=StoredProcedurePlus.Net&version=1.0.3                

Here the very basic usages of the library will be demonstrated through the steps below.

  1. Put the connection string in web.config file with the name "DbString".
<add name="DbString" connectionString="Data Source=YourServerNameOrIp;Initial Catalog=YourDatabaseName;Integrated Security=True;" providerName="System.Data.SqlClient"/>
  1. Create a basic sample stored procedure in your database.
CREATE PROCEDURE SpHelloWorld
    @MyName varchar(100) = NULL, 
    @MyMessage varchar(250) = NULL OUT
AS
BEGIN
    SET NOCOUNT ON;
    SET @MyMessage = 'Hello world ' + @MyName
END
GO
  1. Create a class which will represent the parameters of the stored procedures.
public class SpHelloWorldParams
{
    public string MyName { get; set; }
    public string MyMessage { get; set; }
}   
  1. Create the class which will be representing the stored procedure in code. And implement the abstract setup method to configure the mappings.
    public class SpHelloWorld : StoredProcedureManager<SpHelloWorldParams>
    {
        protected override void Setup(ProcedureConfiguration<SpHelloWorldParams> configuration)
        {
            configuration.Input.Maps(v => v.MyMessage).Out();
        }
    }
  1. Thats it then. You are good to go. Whenever and where ever you need to cal the stored procedure just call its Execute method and it will take care of everything for you.
SpHelloWorldParams param = new SpHelloWorldParams()
{
    MyName = "<Your name>"
};
SpHelloWorld sp = new SpHelloWorld();
sp.Execute(param);
string msg = param.MyMessage; // The out parameters will be set in the mapped property and can be used from here.

The variable "msg" now should have the value

"Hello world <Your name>". 
Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  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.0.6 1,172 4/10/2018
1.0.5 1,044 4/7/2018
1.0.4 908 2/26/2018
1.0.3 1,005 2/24/2018
1.0.2 896 2/22/2018
1.0.1 903 2/22/2018
1.0.0 998 2/21/2018

For detailed release  details read README.md file:
https://github.com/sknath25/StoredProcedurePlus.Net/blob/master/README.md