際際滷

際際滷Share a Scribd company logo
Custom LINQ Providers
Custom LINQ Providers
Custom LINQ Providers
Custom LINQ Providers
Custom LINQ Providers
IQUERY
PROVIDER
source
 .Provider
 .Execute<int>(
  Expression.Call(null,
  ((MethodInfo) MethodBase
   .GetCurrentMethod())
   .MakeGenericMethod(
    new Type[] {
     typeof(TSource) }),
     new Expression[] {source.Expression }));
Source
 .Provider
 .CreateQuery<TSource>(
  Expression.Call(
   null,
   ((MethodInfo)
    MethodBase
     .GetCurrentMethod())
     .MakeGenericMethod(
      new Type[] { typeof(TSource) }),
      new Expression[] {
        source.Expression,
        Expression.Quote(predicate) }));
IQUERY
PROVIDER
IQUERY
PROVIDER
IQUERY
PROVIDER
Custom LINQ Providers
Custom LINQ Providers
//is it the same thing?
s1 == s2
s1.Equals(s2)
String.Equals(s1, s2)
String.Compare(s1, s2) == 0
Custom LINQ Providers
Custom LINQ Providers
Custom LINQ Providers
Custom LINQ Providers

More Related Content

Custom LINQ Providers