title: How to use System.Linq extension method in VB.NET project with Option Strict ON
body: <p>I'm using .NET 3.5 In my DataLayer class I have references of System.Core,System.Data.Linq, System.Data.DataSetExtensions. But 
  I cantnot use this feature in Linq query if I have <strong>Option Strict ON</strong>:</p>
  
  <pre><code>    Dim query = From st In db.Students _
           From c In db.Countries.Where(Function(c) c.Id = st.CountryId).DefaultIfEmpty _
           From r In db.Rooms.Where(Function(r) r.Id = st.RoomId).DefaultIfEmpty _
           From b In db.Buildings.Where(Function(b) b.Id = r.BuildingId).DefaultIfEmpty _
           From es In db.Essays.Where(Function(es) es.StudentId = st.Id).DefaultIfEmpty _
           Select st.Id, st.FullName, c.CountryName, r.RoomNumber, b.BuildingName, es.Eassay
  </code></pre>
  
  <p>It will yield the following error:</p>
  
  <pre><code>Overload resolution failed because no accessible 'Where' can be called with these arguments:
      Extension method 'Public Function Where(predicate As System.Linq.Expressions.Expression(Of System.Func(Of Country, Integer, Boolean))) As System.Linq.IQueryable(Of Country)'
  
  defined in 'System.Linq.Queryable': Nested function does not have the same signature as delegate 'System.Func(Of Country, Integer, Boolean)'.
  
  Extension method 'Public Function Where(predicate As System.Linq.Expressions.Expression(Of System.Func(Of Country, Boolean))) As System.Linq.IQueryable(Of Country)' defined in 'System.Linq.Queryable': Option Strict On disallows implicit conversions from 'Boolean?' to 'Boolean'.
      Extension method 'Public Function Where(predicate As System.Func(Of Country, Integer, Boolean)) As System.Collections.Generic.IEnumerable(Of Country)' defined in 'System.Linq.Enumerable': Nested function does not have the same signature as delegate 'System.Func(Of Country, Integer, Boolean)'.
      Extension method 'Public Function Where(predicate As System.Func(Of Country, Boolean)) As System.Collections.Generic.IEnumerable(Of Country)' defined in 'System.Linq.Enumerable': Option Strict On disallows implicit conversions from 'Boolean?' to 'Boolean'..........
  </code></pre>
  
  <p>The "Where" clause is Member of System.Linq.Queryable</p>
  
  <blockquote>
    <p>Public Shared Function Where(Of TSource)(ByVal source As System.Linq.IQueryable(Of TSource), ByVal predicate As System.Linq.Expressions.Expression(Of System.Func(Of TSource, Boolean))) As System.Linq.IQueryable(Of TSource)</p>
  </blockquote>
  
  <p>And "DefaultIfEmpty" is Member of System.Linq.Queryable</p>
  
  <blockquote>
    <p>Public Shared Function DefaultIfEmpty(Of TSource)(ByVal source As System.Linq.IQueryable(Of TSource)) As System.Linq.IQueryable(Of TSource)</p>
  </blockquote>
  
  <p>If I set <strong>Option Strict OFF</strong>, <strong>there's no problem</strong>.</p>
  
  <p>How to use these System.Linq extension methods in VB.NET project with Option Strict ON ? Thank you</p>