This question is locked. New answers and comments are not allowed.
Hi there,
I am really looking for an answer to this...
I am coming from Entity Framework world, where having some transactions in BL could cause escalation to DTC for Oracle
(links for reference: https://forums.oracle.com/thread/2356912 ; http://petermeinl.wordpress.com/2011/03/13/avoiding-unwanted-escalation-to-distributed-transactions/.
Eg for the same connection string:
I want to have similar code as above in my BL to work for both SQL Server and Oracle and to not be afraid about transactions escalation. Let's say, if I have to insert first an order, take the auto-generated id, then perform something else with this uid of the order... this should be possible without escalation neither in SQL Server 2008+ nor Oracle (again, same db, same conn string).
Is this possible using OpenAccess ? If yes, could you give me or point me to a concrete example/test app which works this way?
Thank you very much!
I am really looking for an answer to this...
I am coming from Entity Framework world, where having some transactions in BL could cause escalation to DTC for Oracle
(links for reference: https://forums.oracle.com/thread/2356912 ; http://petermeinl.wordpress.com/2011/03/13/avoiding-unwanted-escalation-to-distributed-transactions/.
Eg for the same connection string:
using
(var ts =
new
TransactionScope())
{
// create order - make use of dbcontext, possibly to call SaveChanges here
orderRepository.CreateOrder(order);
// update inventory - make use of same dbcontext, possibly to call SaveChanges here
inventoryRepository.UpdateInventory(inventory);
ts.Complete();
}
I want to have similar code as above in my BL to work for both SQL Server and Oracle and to not be afraid about transactions escalation. Let's say, if I have to insert first an order, take the auto-generated id, then perform something else with this uid of the order... this should be possible without escalation neither in SQL Server 2008+ nor Oracle (again, same db, same conn string).
Is this possible using OpenAccess ? If yes, could you give me or point me to a concrete example/test app which works this way?
Thank you very much!