title: Multiple databases (multiple DbContexts) in one transaction using TransactionScope
body: <p>I have got two DbContexts(One Model-first and the other one is code first) which connects to two different databases in MSSQL.
  Now when you call SaveChanges from any class, it writes data to both the databases at the same time using TransactionScope class. Code looks like below.</p>
  
  <pre><code>        using (TransactionScope scope = new TransactionScope())
          {
              using (Schema1Entities db1 = new Schema1Entities())
              {
                  db1.SaveChanges();
              }
              using (Schema2Entities db2 = new Schema2Entities())
              {
                  db2.SaveChanges();
              }
              scope.Complete();
          }
  </code></pre>
  
  <p>The problem raises during runtime. it is saying that</p>
  
  <blockquote>
    <p>An exception of type 'System.Data.Entity.Core.EntityException'
    occurred in EntityFramework.SqlServer.dll but was not handled in user
    code</p>
    
    <p>Additional information: The underlying provider failed on Open.</p>
    
    <p>Inner-exception message - {"The partner transaction manager has
    disabled its support for remote/network transactions. (Exception from
    HRESULT: 0x8004D025)"}</p>
  </blockquote>
  
  <p>Turned on MSDTC, and no firewall is blocking the MSDTC.
  Need help immediately.</p>