SPBP.procedure-pattern
1.0.3
dotnet add package SPBP.procedure-pattern --version 1.0.3
NuGet\Install-Package SPBP.procedure-pattern -Version 1.0.3
<PackageReference Include="SPBP.procedure-pattern" Version="1.0.3" />
paket add SPBP.procedure-pattern --version 1.0.3
#r "nuget: SPBP.procedure-pattern, 1.0.3"
// Install SPBP.procedure-pattern as a Cake Addin #addin nuget:?package=SPBP.procedure-pattern&version=1.0.3 // Install SPBP.procedure-pattern as a Cake Tool #tool nuget:?package=SPBP.procedure-pattern&version=1.0.3
Here is explanation of Console application code.
First of all you need to declare a DbAgent variable:
DbAgent agent = new DbAgent(name, connection string.state);
(If agent state isn't true it will throw an exception in procedure execution . )
Then get the all stored procedures existing in that DataBase:
ProcedureFactory fact = SqlManager.GetProceduresFactory(agent);
Select the Procedure:
DataSItem procedure = fact.Procedures[procedurename];
Set values to parameters if procedure needs :
//fill params values
foreach (DataParam param in procedure.Params.Values)
{
if (param.Direction == ParamDirection.Input)
{
Console.Write(param.Name + : );
param.Value = Console.ReadLine();
}
}
Get output params after execution :
If procedure has output params it will be added to DsItem Output params .
if (item.HasOutputParam)
{
foreach (DataParam prm in item.OutputParams.Values)
{
Console.WriteLine(prm.Name + = + prm.Value);
}
}
Get marked class collection :
IBag<Item> items;
ExecResult result = procedure.ExecuteDataReaderByRef(agent, out items);
OR
DataSet set = new DataSet();
procedure.ExecDataSet(agent, out set);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
This package has no dependencies.
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.3 | 1,525 | 10/9/2017 |
Stored Procedure based pattern