title: How does the compiler determine which provider to use when using multiple Linq2 .... contexts?
body: <p>Based on this question: <a href="https://stackoverflow.com/questions/27123507/why-isnt-it-possibile-to-combine-linq-to-xml-with-linq-to-sql/27123799#27123799">Why isn&#39;t it possible to combine LINQ to XML with LINQ to SQL?</a> I would like to know how the compiler determines which LINQ provider to use.</p>
  
  <p>In question Linq2Xml and Linq2Sql are used and the compiler uses Linq2Sql. I am wondering why this is because both providers are used: xml and sql.</p>
  
  <p>Could someone explain how the compiler knows which one to use?</p>