Created
November 21, 2016 16:57
-
-
Save masaeedu/7150ee92becdad4e514dfa160da460ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var overloads = typeof(EntityFrameworkQueryableExtensions) | |
.GetMethods().Where(method => method.Name == "Include"); | |
var include2 = overloads | |
.Where(method => method | |
.GetParameters() | |
.Select(param => param.ParameterType.IsGenericType ? param.ParameterType.GetGenericTypeDefinition() : param.ParameterType) | |
.SequenceEqual(new[] { typeof(IQueryable<>), typeof(string) })); | |
} | |
} | |
public static class EntityFrameworkQueryableExtensions | |
{ | |
public static void Include<TEntity, TProperty>(this IQueryable<TEntity> source, Expression<Func<TEntity, TProperty>> navigationPropertyPath) where TEntity : class | |
{ | |
} | |
public static void Include<TEntity>(this IQueryable<TEntity> source, string navigationPropertyPath) where TEntity : class | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment