Hi,
i am newbie in ASP.net world. i am using 3 tier application architechture for my web based application. data base is sql server 2000. i have looked at object and sql datasource objects but i think they are not suitable for my requirements. so i am planning to directly use ado.net to access data from database.( i.e. creating connection, then creating commands n executing them)
now what i am looking for is the best known practices for the above task. i have following solutions in my mind please let me know if i am missing some or which could be the best aproach.
careate one class which will handle all the database requests so that all the pages and business objects request that class to to do all the db related stuff. (creating connection, command n execution)
have a class which will return connection to your page or business object and then u can use that connection to do db related stuff.
some thing in between that you create a sqlcommand and pass it to a class which will take care of connections and execute you request.
what i am worried about more is the connections to database and the connection pooling n sharing stuff. i dont have any idea how they works.
please help me in this regard
thanks
Have you looked at the Data Access Application Block?
http://msdn2.microsoft.com/en-us/library/aa480458.aspx
|||thanks i had a look through it, n it sound goods.
any other thoughs or ideas???
|||
aakbar:
thanks i had a look through it, n it sound goods.
any other thoughs or ideas???
Yes, follow those suggestions there...
Outside of that, if was using ADO, I'd create a Business Logic class for each of the tables in my database using this class to generate all of the business logic which in turn would then call the ADO function within the DAL which would be your Data Application Blocks.
No comments:
Post a Comment