-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query: Implement inheritance support for relational layer
- Add discriminator predicate in SelectExpression (filed #15808 to remove redundant) - Add TPH support in materializer. This happens at core level now - Add translation for is operator inside lambda - Add translation for OfType method
- Loading branch information
Showing
28 changed files
with
458 additions
and
192 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
28 changes: 4 additions & 24 deletions
28
src/EFCore.Relational/Query/Pipeline/RelationalShapedQueryExpression.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,17 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using System.Linq.Expressions; | ||
using Microsoft.EntityFrameworkCore.Query.Pipeline; | ||
using Microsoft.EntityFrameworkCore.Relational.Query.Pipeline.SqlExpressions; | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Relational.Query.Pipeline | ||
{ | ||
public class RelationalShapedQueryExpression : ShapedQueryExpression | ||
{ | ||
public RelationalShapedQueryExpression(IEntityType entityType) | ||
public RelationalShapedQueryExpression(Expression queryExpression, Expression shaperExpression) | ||
{ | ||
QueryExpression = new SelectExpression(entityType); | ||
ShaperExpression = new EntityShaperExpression( | ||
entityType, | ||
new ProjectionBindingExpression( | ||
QueryExpression, | ||
new ProjectionMember(), | ||
typeof(ValueBuffer)), | ||
false); | ||
} | ||
|
||
public RelationalShapedQueryExpression(IEntityType entityType, string sql) | ||
{ | ||
QueryExpression = new SelectExpression(entityType, sql); | ||
ShaperExpression = new EntityShaperExpression( | ||
entityType, | ||
new ProjectionBindingExpression( | ||
QueryExpression, | ||
new ProjectionMember(), | ||
typeof(ValueBuffer)), | ||
false); | ||
QueryExpression = queryExpression; | ||
ShaperExpression = shaperExpression; | ||
} | ||
} | ||
} |
Oops, something went wrong.