title: Multiple databases(datacontext) on same server without MS DTC
body: <p>I'm using EF5.0 with SQL server 2008. I have two databases on the same server instance. I need to update tables on both databases and want them to be same transaction. So I used the TransactionScope. Below is the code -</p>
  
  <pre><code>public void Save()
  {
          var MSObjectContext = ((IObjectContextAdapter)MSDataContext).ObjectContext;
          var AWObjectContext = ((IObjectContextAdapter)AwContext).ObjectContext;
  
          using (var scope = new TransactionScope(TransactionScopeOption.Required,
                                               new TransactionOptions
                                                   {
                                                       IsolationLevel = IsolationLevel.ReadUncommitted
                                                   }))
          {               
              MSObjectContext.SaveChanges(SaveOptions.DetectChangesBeforeSave);
              AWObjectContext.SaveChanges(SaveOptions.DetectChangesBeforeSave);
  
              scope.Complete();
          }
      }
  </code></pre>
  
  <p>When I use the above code Transaction gets promoted to DTC. After searching on internet I found that this happens because of two different connectionstrings / connections. But what I dont understand is if I write a stored procedure on one database which updates table in a different database (on same server) no DTC is required. Then why EF or TransactionScope is promoting this to DTC? Is there any other work around for this?</p>
  
  <p>Please advise</p>
  
  <p>Thanks in advance</p>
  
  <p>Sai</p>