Hi, Community Members.
I am using,
Windows 7 Enterprise as my development machine.
.NET Framework 4.5 as my Framework with Oracle 12 C client.
Database is 11g.
and in my Services.msc
Distributed Transaction Coordinator service is running
OracleOraClient12Home1MTSRecoveryService is also running.
My question is when i am creating an Entity Framework context and Inserting even in a single table (although have to involve 2 oracle tables) using TransactionScope() i am getting the following error.
********************************************************************************************************************************************
"The underlying provider failed on Open. and innerException says Unable to enlist in a distributed transaction source Oracle Data Provider for .NET".
Stack trace is at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable)
***********************************************************************************************************************************************************
The error comes in when i am doing a simple plain insert and executes the line DbContext.SaveChanges(); function. heres my code for understanding
using (TransactionScope transaction = new TransactionScope())
{
// my declaration of context and assigning entities.
DbContext.SaveChanges();
transaction.Complete();
}
My objective is simple that i want a transaction base insert so that i accordingly commit and rollback.
Any help/recommendations/clue would be highly appreciated. Awaiting the response.
Thanks.
Navaid.