diff --git a/src/AutoMapper.EF6/AutoMapper.EF6.csproj b/src/AutoMapper.EF6/AutoMapper.EF6.csproj index 322deea..8326cde 100644 --- a/src/AutoMapper.EF6/AutoMapper.EF6.csproj +++ b/src/AutoMapper.EF6/AutoMapper.EF6.csproj @@ -3,7 +3,7 @@ Extensions to make AutoMapper easier to work with Entity Framework. Project to collections and items, decompiling calculated properties along the way Jimmy Bogard - net461;netstandard2.1 + net462;netstandard2.1 AutoMapper.EF6 AutoMapper.EF6 EntityFramework;AutoMapper @@ -16,8 +16,8 @@ - - + + diff --git a/src/AutoMapper.EF6/EntityFrameworkExtensions.cs b/src/AutoMapper.EF6/EntityFrameworkExtensions.cs index 172c6b5..d5464bf 100644 --- a/src/AutoMapper.EF6/EntityFrameworkExtensions.cs +++ b/src/AutoMapper.EF6/EntityFrameworkExtensions.cs @@ -17,41 +17,21 @@ public static Task> ProjectToListAsync(this IQu return queryable.ProjectTo(config).DecompileAsync().ToListAsync(); } - public static Task> ProjectToListAsync(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().ToListAsync(); - } - public static Task> ProjectToListAsync(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().ToListAsync(); } - public static Task> ProjectToListAsync(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().ToListAsync(); - } - public static Task ProjectToArrayAsync(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().ToArrayAsync(); } - public static Task ProjectToArrayAsync(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().ToArrayAsync(); - } - public static Task ProjectToArrayAsync(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().ToArrayAsync(); } - public static Task ProjectToArrayAsync(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().ToArrayAsync(); - } - public static Task ProjectToSingleOrDefaultAsync(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().SingleOrDefaultAsync(); @@ -62,16 +42,6 @@ public static Task ProjectToSingleOrDefaultAsync(config).DecompileAsync().SingleOrDefaultAsync(); } - public static Task ProjectToSingleOrDefaultAsync(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().SingleOrDefaultAsync(); - } - - public static Task ProjectToSingleOrDefaultAsync(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().SingleOrDefaultAsync(); - } - public static Task ProjectToSingleOrDefaultAsync(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().SingleOrDefaultAsync(); @@ -82,16 +52,6 @@ public static Task ProjectToSingleOrDefaultAsync(config, parameters).DecompileAsync().SingleOrDefaultAsync(); } - public static Task ProjectToSingleOrDefaultAsync(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().SingleOrDefaultAsync(); - } - - public static Task ProjectToSingleOrDefaultAsync(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().SingleOrDefaultAsync(); - } - public static Task ProjectToSingleAsync(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().SingleAsync(); @@ -102,16 +62,6 @@ public static Task ProjectToSingleAsync(thi return queryable.Where(predicate).ProjectTo(config).DecompileAsync().SingleAsync(); } - public static Task ProjectToSingleAsync(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().SingleAsync(); - } - - public static Task ProjectToSingleAsync(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().SingleAsync(); - } - public static Task ProjectToSingleAsync(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().SingleAsync(); @@ -122,16 +72,6 @@ public static Task ProjectToSingleAsync(thi return queryable.Where(predicate).ProjectTo(config, parameters).DecompileAsync().SingleAsync(); } - public static Task ProjectToSingleAsync(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().SingleAsync(); - } - - public static Task ProjectToSingleAsync(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().SingleAsync(); - } - public static Task ProjectToFirstOrDefaultAsync(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().FirstOrDefaultAsync(); @@ -142,16 +82,6 @@ public static Task ProjectToFirstOrDefaultAsync(config).DecompileAsync().FirstOrDefaultAsync(); } - public static Task ProjectToFirstOrDefaultAsync(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().FirstOrDefaultAsync(); - } - - public static Task ProjectToFirstOrDefaultAsync(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().FirstOrDefaultAsync(); - } - public static Task ProjectToFirstOrDefaultAsync(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().FirstOrDefaultAsync(); @@ -162,16 +92,6 @@ public static Task ProjectToFirstOrDefaultAsync(config, parameters).DecompileAsync().FirstOrDefaultAsync(); } - public static Task ProjectToFirstOrDefaultAsync(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().FirstOrDefaultAsync(); - } - - public static Task ProjectToFirstOrDefaultAsync(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().FirstOrDefaultAsync(); - } - public static Task ProjectToFirstAsync(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().FirstAsync(); @@ -182,16 +102,6 @@ public static Task ProjectToFirstAsync(this return queryable.Where(predicate).ProjectTo(config).DecompileAsync().FirstAsync(); } - public static Task ProjectToFirstAsync(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().FirstAsync(); - } - - public static Task ProjectToFirstAsync(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().FirstAsync(); - } - public static Task ProjectToFirstAsync(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().FirstAsync(); @@ -202,56 +112,26 @@ public static Task ProjectToFirstAsync(this return queryable.Where(predicate).ProjectTo(config, parameters).DecompileAsync().FirstAsync(); } - public static Task ProjectToFirstAsync(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().FirstAsync(); - } - - public static Task ProjectToFirstAsync(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().FirstAsync(); - } - public static List ProjectToList(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().ToList(); } - public static List ProjectToList(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().ToList(); - } - public static List ProjectToList(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().ToList(); } - public static List ProjectToList(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().ToList(); - } - public static TDestination[] ProjectToArray(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().ToArray(); } - public static TDestination[] ProjectToArray(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().ToArray(); - } - public static TDestination[] ProjectToArray(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().ToArray(); } - public static TDestination[] ProjectToArray(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().ToArray(); - } - public static TDestination ProjectToSingleOrDefault(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().SingleOrDefault(); @@ -262,16 +142,6 @@ public static TDestination ProjectToSingleOrDefault(this return queryable.Where(predicate).ProjectTo(config).DecompileAsync().SingleOrDefault(); } - public static TDestination ProjectToSingleOrDefault(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().SingleOrDefault(); - } - - public static TDestination ProjectToSingleOrDefault(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().SingleOrDefault(); - } - public static TDestination ProjectToSingleOrDefault(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().SingleOrDefault(); @@ -282,16 +152,6 @@ public static TDestination ProjectToSingleOrDefault(this return queryable.Where(predicate).ProjectTo(config, parameters).DecompileAsync().SingleOrDefault(); } - public static TDestination ProjectToSingleOrDefault(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().SingleOrDefault(); - } - - public static TDestination ProjectToSingleOrDefault(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().SingleOrDefault(); - } - public static TDestination ProjectToSingle(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().Single(); @@ -302,16 +162,6 @@ public static TDestination ProjectToSingle(this IQueryabl return queryable.Where(predicate).ProjectTo(config).DecompileAsync().Single(); } - public static TDestination ProjectToSingle(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().Single(); - } - - public static TDestination ProjectToSingle(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().Single(); - } - public static TDestination ProjectToSingle(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().Single(); @@ -322,16 +172,6 @@ public static TDestination ProjectToSingle(this IQueryabl return queryable.Where(predicate).ProjectTo(config, parameters).DecompileAsync().Single(); } - public static TDestination ProjectToSingle(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().Single(); - } - - public static TDestination ProjectToSingle(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().Single(); - } - public static TDestination ProjectToFirstOrDefault(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().FirstOrDefault(); @@ -342,16 +182,6 @@ public static TDestination ProjectToFirstOrDefault(this I return queryable.Where(predicate).ProjectTo(config).DecompileAsync().FirstOrDefault(); } - public static TDestination ProjectToFirstOrDefault(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().FirstOrDefault(); - } - - public static TDestination ProjectToFirstOrDefault(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().FirstOrDefault(); - } - public static TDestination ProjectToFirstOrDefault(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().FirstOrDefault(); @@ -362,16 +192,6 @@ public static TDestination ProjectToFirstOrDefault(this I return queryable.Where(predicate).ProjectTo(config, parameters).DecompileAsync().FirstOrDefault(); } - public static TDestination ProjectToFirstOrDefault(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().FirstOrDefault(); - } - - public static TDestination ProjectToFirstOrDefault(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().FirstOrDefault(); - } - public static TDestination ProjectToFirst(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync().First(); @@ -382,16 +202,6 @@ public static TDestination ProjectToFirst(this IQueryable return queryable.Where(predicate).ProjectTo(config).DecompileAsync().First(); } - public static TDestination ProjectToFirst(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync().First(); - } - - public static TDestination ProjectToFirst(this IQueryable queryable, Expression> predicate) - { - return queryable.Where(predicate).ProjectTo().DecompileAsync().First(); - } - public static TDestination ProjectToFirst(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync().First(); @@ -402,34 +212,14 @@ public static TDestination ProjectToFirst(this IQueryable return queryable.Where(predicate).ProjectTo(config, parameters).DecompileAsync().First(); } - public static TDestination ProjectToFirst(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync().First(); - } - - public static TDestination ProjectToFirst(this IQueryable queryable, Expression> predicate, object parameters) - { - return queryable.Where(predicate).ProjectTo(parameters).DecompileAsync().First(); - } - public static IQueryable ProjectToQueryable(this IQueryable queryable, IConfigurationProvider config) { return queryable.ProjectTo(config).DecompileAsync(); } - public static IQueryable ProjectToQueryable(this IQueryable queryable) - { - return queryable.ProjectTo().DecompileAsync(); - } - public static IQueryable ProjectToQueryable(this IQueryable queryable, IConfigurationProvider config, object parameters) { return queryable.ProjectTo(config, parameters).DecompileAsync(); } - - public static IQueryable ProjectToQueryable(this IQueryable queryable, object parameters) - { - return queryable.ProjectTo(parameters).DecompileAsync(); - } } } \ No newline at end of file