Skip to content

Commit de5b715

Browse files
authored
Merge pull request #167 from koenbeuk/feature/remove-obsolete-code
Remove obsolete code
2 parents d4ec9f5 + eb73096 commit de5b715

2 files changed

Lines changed: 18 additions & 40 deletions

File tree

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Linq.Expressions;
5-
using System.Text;
6-
using System.Threading.Tasks;
1+
using System.Linq.Expressions;
72
using EntityFrameworkCore.Projectables.Services;
83

9-
namespace EntityFrameworkCore.Projectables.Extensions
10-
{
11-
public static class ExpressionExtensions
12-
{
13-
[Obsolete("Use ExpandProjectables instead")]
14-
public static Expression ExpandQuaryables(this Expression expression)
15-
=> ExpandProjectables(expression);
4+
namespace EntityFrameworkCore.Projectables.Extensions;
165

17-
/// <summary>
18-
/// Replaces all calls to properties and methods that are marked with the <C>Projectable</C> attribute with their respective expression tree
19-
/// </summary>
20-
public static Expression ExpandProjectables(this Expression expression)
21-
=> new ProjectableExpressionReplacer(new ProjectionExpressionResolver(), false).Replace(expression);
22-
}
23-
}
6+
public static class ExpressionExtensions
7+
{
8+
/// <summary>
9+
/// Replaces all calls to properties and methods that are marked with the <C>Projectable</C> attribute with their respective expression tree
10+
/// </summary>
11+
public static Expression ExpandProjectables(this Expression expression)
12+
=> new ProjectableExpressionReplacer(new ProjectionExpressionResolver(), false).Replace(expression);
13+
}
Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using EntityFrameworkCore.Projectables.Services;
1+
namespace EntityFrameworkCore.Projectables.Extensions;
72

8-
namespace EntityFrameworkCore.Projectables.Extensions
3+
public static class QueryableExtensions
94
{
10-
public static class QueryableExtensions
11-
{
12-
[Obsolete("Use ExpandProjectables instead")]
13-
public static IQueryable<TModel> ExpandQuaryables<TModel>(this IQueryable<TModel> query)
14-
=> ExpandProjectables(query);
15-
16-
/// <summary>
17-
/// Replaces all calls to properties and methods that are marked with the <C>Projectable</C> attribute with their respective expression tree
18-
/// </summary>
19-
public static IQueryable<TModel> ExpandProjectables<TModel>(this IQueryable<TModel> query)
20-
=> query.Provider.CreateQuery<TModel>(query.Expression.ExpandProjectables());
21-
}
22-
}
5+
/// <summary>
6+
/// Replaces all calls to properties and methods that are marked with the <C>Projectable</C> attribute with their respective expression tree
7+
/// </summary>
8+
public static IQueryable<TModel> ExpandProjectables<TModel>(this IQueryable<TModel> query)
9+
=> query.Provider.CreateQuery<TModel>(query.Expression.ExpandProjectables());
10+
}

0 commit comments

Comments
 (0)