N
No Name
Hello,
I have following scenario(s):
1) WPF client should connect to windows service hosting
WCF which runs operations using BLL and DAL dlls.
2) WPF client with same DLLs without WCF service.
---------------------------------------------------------
I have BLL object which should be the root of / or participate in
transaction (operation can include one or more DAL
components). Transaction scope inside BLL method uses
ambient transaction created by WCF (if client transaction
is not present) or by WPF client.
I want to use same SQL connection object with all DAL
components in order to avoid distributed transaction.
My question is:
Is it possible/correct to hook "SqlConnection.Close()"
code to TransactionCompleted for current event in order
to close database connection correctly and in right moment?
If not, when is the right moment to close shared connection?
Thank you,
A.
I have following scenario(s):
1) WPF client should connect to windows service hosting
WCF which runs operations using BLL and DAL dlls.
2) WPF client with same DLLs without WCF service.
---------------------------------------------------------
I have BLL object which should be the root of / or participate in
transaction (operation can include one or more DAL
components). Transaction scope inside BLL method uses
ambient transaction created by WCF (if client transaction
is not present) or by WPF client.
I want to use same SQL connection object with all DAL
components in order to avoid distributed transaction.
My question is:
Is it possible/correct to hook "SqlConnection.Close()"
code to TransactionCompleted for current event in order
to close database connection correctly and in right moment?
If not, when is the right moment to close shared connection?
Thank you,
A.