StoredProcedurePlus.Net 1.0.3

High performance ADO.Net wrapper specifically develop to help life easy working with Microsoft SQL Server stored procedures for .Net projects/Applications.
For more detials vitis Git Wiki page:
https://github.com/sknath25/StoredProcedurePlus.Net/wiki

There is a newer version of this package available.
See the version list below for details.
Install-Package StoredProcedurePlus.Net -Version 1.0.3
dotnet add package StoredProcedurePlus.Net --version 1.0.3
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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>". 

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>". 

Release Notes

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

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.6 302 4/10/2018
1.0.5 382 4/7/2018
1.0.4 235 2/26/2018
1.0.3 336 2/24/2018
1.0.2 241 2/22/2018
1.0.1 234 2/22/2018
1.0.0 310 2/21/2018