Browsed by
Category: Uncategorized

A Stored Procedure Helper in .Net C#

A Stored Procedure Helper in .Net C#

I wrote this helper to make calling SQL stored procedures easier and less error prone. The idea here is to encapsulate the parameters of the stored procedure in an interface method that gets implemented for each stored procedure. The values of the input parameters are encapsulated in an object. It makes use of Microsoft’s (now defunct) Enterprise Library DAAB (https://learn.microsoft.com/en-us/archive/msdn-magazine/2005/august/the-enterprise-library-data-access-application-block-part-2). Here’s the interface definition: Here’s the definition of a class named “LoginParameters” that implements the interface “IPrepareSpParameterValues”. It encapsulates the…

Read More Read More