Custom LINQ Providers

950 views

Published on

The presentation how to create custom linq providers for .net

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
950
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Custom LINQ Providers

  1. 1. IQUERYPROVIDER
  2. 2. source .Provider .Execute<int>( Expression.Call(null, ((MethodInfo) MethodBase .GetCurrentMethod()) .MakeGenericMethod( new Type[] { typeof(TSource) }), new Expression[] {source.Expression }));
  3. 3. Source .Provider .CreateQuery<TSource>( Expression.Call( null, ((MethodInfo) MethodBase .GetCurrentMethod()) .MakeGenericMethod( new Type[] { typeof(TSource) }), new Expression[] { source.Expression, Expression.Quote(predicate) }));
  4. 4. IQUERYPROVIDER
  5. 5. IQUERYPROVIDER
  6. 6. IQUERYPROVIDER
  7. 7. //is it the same thing?s1 == s2s1.Equals(s2)String.Equals(s1, s2)String.Compare(s1, s2) == 0
  8. 8. ••••

×