StoredProcedureEFCore 0.1.0

.NET Core 1.1
There is a newer version of this package available.
See the version list below for details.
dotnet add package StoredProcedureEFCore --version 0.1.0
NuGet\Install-Package StoredProcedureEFCore -Version 0.1.0
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="StoredProcedureEFCore" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StoredProcedureEFCore --version 0.1.0
#r "nuget: StoredProcedureEFCore, 0.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install StoredProcedureEFCore as a Cake Addin
#addin nuget:?package=StoredProcedureEFCore&version=0.1.0

// Install StoredProcedureEFCore as a Cake Tool
#tool nuget:?package=StoredProcedureEFCore&version=0.1.0

Example

List<Model> rows = null;

ctx.LoadStoredProc("dbo.ListAll")
   .AddParam("limit", 300)
   .AddOutParam("limitOut", out IOutParam<long> limitOut)
   .Exec(r => rows = r.ToList<Model>());

long limitOutValue = limitOut.Value;

ctx.LoadStoredProc("dbo.ReturnBoolean")
   .AddParam("boolean_to_return", true)
   .ReturnValue(out IOutParam<bool> retParam)
   .ExecNonQuery();

bool b = retParam.Value;

ctx.LoadStoredProc("dbo.ListAll")
   .AddParam("limit", 1)
   .ExecScalar(out long l);

API

DbContext

IStoredProcBuilder             LoadStoredProc(string name)

IDataReader

List<T>                        ToList<T>()
Dictionary<TKey, TValue>       ToDictionary<TKey, TValue>()
Dictionary<TKey, List<TValue>> ToLookup<TKey, TValue>()
HashSet<T>                     ToSet<T>()
List<T>                        Column<T>()
T                              First<T>()
T                              FirstOrDefault<T>()
T                              Single<T>()

IStoredProcBuilder

IStoredProcBuilder             AddParam(string name, object val)
IStoredProcBuilder             AddInputOutputParam<T>(string name, T val, out OutParam<T> outParam)
IStoredProcBuilder             AddOutParam<T>(string name, out IOutParam<T> outParam)
IStoredProcBuilder             ReturnValue<T>(out IOutParam<T> retParam)
void                           Exec(Action<IDataReader> action)
void                           ExecNonQuery()
void                           ExecScalar<T>(out T val)
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on StoredProcedureEFCore:

Package Downloads
BinaryBlox.SDK

Package Description

BinaryBlox.SDK.Configuration

Package Description

BinaryBlox.SDK.Account

Package Description

BinaryBlox.SDK.Permission

Package Description

DevDiamond.AspNetCore.JqueryDataTable

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 165,253 11/15/2020
1.0.4 62,459 6/16/2020
1.0.3 421 6/15/2020
1.0.2 9,944 4/10/2020
1.0.1 12,596 2/13/2020
1.0.0 3,490 1/14/2020
0.3.15 13,298 10/30/2019
0.3.14 2,294 10/22/2019
0.3.13 563 10/17/2019
0.3.12 808 8/9/2019
0.3.11 14,665 6/1/2019
0.3.10 18,697 11/15/2018
0.3.9 8,521 5/4/2018
0.3.8 1,340 4/21/2018
0.3.7 1,195 4/3/2018
0.3.6 1,229 3/16/2018
0.3.5 992 3/16/2018
0.3.4 1,237 3/2/2018
0.3.3 1,321 2/1/2018
0.3.2 1,106 1/19/2018
0.3.1 1,081 1/8/2018
0.3.0 1,081 1/8/2018
0.2.0 1,180 12/29/2017
0.1.1 1,168 12/28/2017
0.1.0 1,010 12/26/2017