Custom DAL having functions which recieving StoredProcedure Name and S(smallworkarounds.blogspot.com)
submitted by
ash143gupta(750) 3 years, 2 months ago
In this article we will mainly concentrate on the DAL part or the last layer or tier in our architecture.In our model we are not using ad-hoc queries but only stored procedures.So we have developed a SqlHelper file which will recieve only the names of stored procedure and a sorted list having a key value pair of parameters which we will pass to the stored procedure.
This layer will also handle every opening and closing of the connection to the database.We generally return a reader from the database to any point in our code but here we don't want to open and close connection in the application logic so we are converting the reader fetched from the database to the dataset and then finally returning the dataset in the application.
There are various functions used in order to achieve this logic i will describe here a few important ones.You can download the whole file which is attached at the end of this article.
|category: Database
|Views: 15
tags:
Database another
Everyones tags:
Your Tags: