CodeOnlyStoredProcedures 2.3.0

There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package CodeOnlyStoredProcedures -Version 2.3.0
dotnet add package CodeOnlyStoredProcedures --version 2.3.0
<PackageReference Include="CodeOnlyStoredProcedures" Version="2.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodeOnlyStoredProcedures --version 2.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeOnlyStoredProcedures, 2.3.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 CodeOnlyStoredProcedures as a Cake Addin
#addin nuget:?package=CodeOnlyStoredProcedures&version=2.3.0

// Install CodeOnlyStoredProcedures as a Cake Tool
#tool nuget:?package=CodeOnlyStoredProcedures&version=2.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

A library for easily calling Stored Procedures in .NET. Works great with Entity Framework Code First models.
Code Only Stored Procedures will not create any Stored Procedures on your database. Instead, its aim is to make it easy to call your existing stored procedures by writing simple code.

  • .NETFramework 4.0

  • .NETFramework 4.5

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CodeOnlyStoredProcedures:

Package Downloads
ContractOnlyStoredProcedures

Easily call stored procedures by writing an interface that describes their names, inputs, and results. Uses the CodeOnlyStoredProcedures library to acually execute the stored procedures.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.4.0-pre04 12,372 4/27/2017
2.4.0-pre03 643 2/14/2017
2.4.0-pre02 628 1/18/2017
2.4.0-pre01 624 1/1/2017
2.3.0 16,279 10/26/2016
2.3.0-pre06 846 10/15/2016
2.3.0-pre05 903 10/14/2016
2.3.0-pre04 877 9/2/2016
2.3.0-pre03 882 8/9/2016
2.3.0-pre02 868 8/2/2016
2.3.0-pre01 847 8/1/2016
2.2.6 1,928 5/26/2016
2.2.6-pre1 909 5/24/2016
2.2.5 1,148 2/25/2016
2.2.5-pre3 873 2/20/2016
2.2.5-pre2 894 2/15/2016
2.2.5-pre1 883 2/15/2016
2.2.5-pre 878 2/7/2016
2.2.4 988 2/3/2016
2.2.4-pre 950 12/5/2015
2.2.3 1,254 8/24/2015
2.2.3-pre1 925 8/23/2015
2.2.2 1,099 6/22/2015
2.2.2-pre1 914 6/20/2015
2.2.2-pre 923 6/20/2015
2.2.1 898 5/31/2015
2.2.0 960 5/23/2015
2.2.0-pre1 951 5/22/2015
2.2.0-pre 800 5/16/2015
2.1.0 965 5/12/2015
2.1.0-pre1 936 5/9/2015
2.1.0-pre 676 4/18/2015
2.0.0 745 4/12/2015
2.0.0-pre5 749 4/10/2015
2.0.0-pre4 749 3/30/2015
2.0.0-pre3 698 3/17/2015
2.0.0-pre2 667 3/14/2015
2.0.0-pre1 711 11/27/2014
2.0.0-pre 759 10/29/2014
1.3.1 943 10/23/2014
1.3.1-pre 727 10/18/2014
1.3.0 753 10/17/2014
1.3.0-pre-14269-0553 735 9/27/2014
1.2.1 826 9/10/2014
1.2.0 768 9/9/2014
1.1.0 752 8/27/2014
1.1.0-pre-14235-2130 733 8/23/2014
1.0.1 774 8/18/2014
1.0.0 819 6/4/2014
1.0.0-RC-14138-2033 689 5/18/2014
1.0.0-RC-14135-0132 737 5/15/2014
0.6.0-RC-14124-2136 685 5/4/2014
0.5.1-RC-14073-1456 682 3/14/2014
0.5.0-rc-14031-0502 699 1/31/2014
0.4.0-rc-14030-0437 784 1/30/2014
0.3.3-rc-14027-0615 701 1/27/2014
0.3.2-rc-14027-0322 722 1/27/2014
0.3.1-rc-14025-0559 702 1/25/2014
0.3.1-beta-14025-0557 695 1/25/2014
0.2.1-rc-14024-0611 693 1/24/2014
0.2.1-beta-14024-0547 696 1/24/2014
0.1.1 810 1/23/2014
0.0.7 769 1/7/2014
0.0.6.1 753 1/2/2014
0.0.5 744 12/24/2013
0.0.3 765 12/9/2013

2.3.0
Can now opt in to not clone the database connection before executing a StoredProcedure.
Can now execute a non-query using the dynamic syntax.
Fixed bug where hierarchical result sets could not be marked as optional.
Hierarchies are now much faster to build, especially with large data sets.
DateTimeOffset is now fully supported (in the past you had to use attributes or the Fluent syntax to specify the DbType).
Hierarchical result sets will now match using case-insensitive names if the case-sensitive ones aren't found.
Added ability to specify the quote method for the objects, which allows you to call stored procedures in non-Microsoft products.
    
2.2.6
Fixed bug where dynamic stored procedures wouldn't dispose of the IDbCommand objects they created.
Fixed bug where empty Table Valued Parameters could not be passed.

2.2.5
Fixed bug where a dynamic stored procedure wouldn't dispose its database connection if the stored procedure threw an exception.
Fixed bug in the dynamic syntax where asynchronous execution of a stored procedure that has no results would not throw exceptions from sql server.
Fixed bug where StoredProcedure<dynamic> (both syntaxes) would return DBNull values instead of null.
Fixed bug where WithInputOutputParameter and WithOutputParameter would not infer DBType when not passed explicitly
Fixed bug where symbols were not available for .Net 4.0 projects
Fixed bug where custom structs could not be passed as input parameters to the dynamic syntax
Fixed bug where enums were being sent as object. Will now send as string

2.2.4
Fixed bug where calling ToString on a stored procedure could print parameters with a double @.
Fixed bug where the fluent syntax would not infer the type of its parameters from the compile time generic parameter type.

2.2.3
Fixed bug where dynamic stored procedures wouldn't close their connections.

2.2.2
Fixed bug where null values could not be passed in the dynamic syntax.
Fixed bug where TableValuedParameters would attempt to pass set only properties, resulting in an exception.
Fixed bug where an exception would be thrown when using a mapped interface, if that interface had an IEnumerable property that was
not mapped in the implementing class.

2.2.1
Fixed bug where Timespan and DateTimeOffset result columns would throw an exception.

2.2.0
Added ability to pass Table Valued Parameters in the dynamic syntax, and as a property via WithInput, without decorating the class with the TableValuedParameterAttribute. It will use the class name as the TableName, and dbo as the Schema.
Added ability to return single rows from dynamic stored procedures in one line, so long as the stored procedure returns one or fewer items

2.1.0
Added ability to specify the order in which multiple result sets are returned for hierarchical models.
Added global data transformers, that will be applied for all columns in all stored procedures. These should be specified before any StoredProcedure is created.
Added option to enable numeric conversions for all numeric properties. This should be specified before any StoredProcedure is created.
Fixed bug where System.Single (float in C#) property types could not be returned (it would throw an exception).
Fixed bug where StoredProcedure<dynamic> would not apply any IDataTransformers specified.
Fixed bug where expected columns that don't get returned were throwing an IndexOutOfRangeException instead of a StoredProcedureResultsException
         
2.0.0
Removed dependency on SQL Server for all stored procedures (except those that accept Table Valued Parameters)
Results from the dynamic syntax can now be cast explicitly
Result columns can be marked as optional, so if no value is returned, the execution will not fail.
Stored Procedures can return dynamic (which will be an ExpandoObject, with all colums returned by the stored procedure as properties).
Stored Procedures that return hierarchical objects as multiple result sets can now have their relationships automatically discovered
Performance improvements

1.3.1
Fixed bug where none of the named properties of StoredProcedureParameterAttribute could be set on an object, because they were nullable.
Fixed bug where calling a stored procedure that returns results asynchronously could block the calling thread.

1.3.0
Added StoredProcedure.Execute and StoredProcedure.ExecuteAsync methods to more explicitly control dynamic stored procedures.
Added ability to specify an implementation of an interface, so a StoredProcedure can return an IEnumerable<interface>

1.2.1
Added better exception when a model is missing a public parameterless constructor.