S
Steve B.
Hi,
I've a businness layer with some business objects. In these objects, I use
several TableAdapters to get and update data.
In order to maintain the consistency of data, I'd like to use transaction.
How can I combine both [
WebMethod(TransactionOption=TransactionOption.RequiresNew)] and the
using(TransactionScope) statement ?
By now I've something like this :
The bll :
public void DeleteGroup(int groupID)
{
using (TransactionScope transactionScope = new TransactionScope())
{
DO THE WORK
// If nothing wrong happened, Complete() the transaction
transactionScope.Complete();
}
}
The WS that map the bll:
[WebMethod(
TransactionOption = TransactionOption.Required
)]
public void DeleteGroup(int groupID)
{
gMgr.DeleteGroup(groupID);
}
Will the delete operation will be enlisted in "global" transaction ? Have I
something to do on the proxy object on the client side if I call several WS
proxies ?
Thanks,
Steve
I've a businness layer with some business objects. In these objects, I use
several TableAdapters to get and update data.
In order to maintain the consistency of data, I'd like to use transaction.
How can I combine both [
WebMethod(TransactionOption=TransactionOption.RequiresNew)] and the
using(TransactionScope) statement ?
By now I've something like this :
The bll :
public void DeleteGroup(int groupID)
{
using (TransactionScope transactionScope = new TransactionScope())
{
DO THE WORK
// If nothing wrong happened, Complete() the transaction
transactionScope.Complete();
}
}
The WS that map the bll:
[WebMethod(
TransactionOption = TransactionOption.Required
)]
public void DeleteGroup(int groupID)
{
gMgr.DeleteGroup(groupID);
}
Will the delete operation will be enlisted in "global" transaction ? Have I
something to do on the proxy object on the client side if I call several WS
proxies ?
Thanks,
Steve