ADO.Net Transaction
-
Hi, I'm writing a generic DAL layer for my development team because we dont want to give access of connection to the developers. I'm stuck in terms of providing option to handle Transaction oriented queries. Could some one throw light? So, lets say I've 3 queries which have to be executed under one transaction. Since developer dont have access to Connection they can not create transactions. Shall I take array of queries and parameters from client and execute within the Transaction Block? Is it a right approach. Note:- I'm not using ORM hence I can not use Command Patterns also. Thanks
-
Hi, I'm writing a generic DAL layer for my development team because we dont want to give access of connection to the developers. I'm stuck in terms of providing option to handle Transaction oriented queries. Could some one throw light? So, lets say I've 3 queries which have to be executed under one transaction. Since developer dont have access to Connection they can not create transactions. Shall I take array of queries and parameters from client and execute within the Transaction Block? Is it a right approach. Note:- I'm not using ORM hence I can not use Command Patterns also. Thanks
Also you have asked the question in QA section too http://www.codeproject.com/Questions/135220/ADO-Net-with-Transcations.aspx[^] Also found 1 answer with that. Please don't post your question in many places here otherwise all will be ignored.
thatraja |Chennai|India|
Brainbench certifications
Univotes are like kid's kisses don't reject it :-)
Do what you want quickly because the Doomsday on 2012 :-)
My childhood story -
Also you have asked the question in QA section too http://www.codeproject.com/Questions/135220/ADO-Net-with-Transcations.aspx[^] Also found 1 answer with that. Please don't post your question in many places here otherwise all will be ignored.
thatraja |Chennai|India|
Brainbench certifications
Univotes are like kid's kisses don't reject it :-)
Do what you want quickly because the Doomsday on 2012 :-)
My childhood story -
Hi, I'm writing a generic DAL layer for my development team because we dont want to give access of connection to the developers. I'm stuck in terms of providing option to handle Transaction oriented queries. Could some one throw light? So, lets say I've 3 queries which have to be executed under one transaction. Since developer dont have access to Connection they can not create transactions. Shall I take array of queries and parameters from client and execute within the Transaction Block? Is it a right approach. Note:- I'm not using ORM hence I can not use Command Patterns also. Thanks
The application shouldn't know that multiple queries are required -- it should just call one API method and pass in the data. What happens inside that method might involve a transaction.
PlaceOrder ( Customer , Item )
Begin transaction
Insert order
Insert invoice
Adjust inventory
Commit transaction