mirror of
https://github.com/zoriya/EntityFrameworkCore.Projectables.git
synced 2026-08-15 18:44:57 +00:00
Some clarifying comments for extracting the original expression type in a member expression
This commit is contained in:
@@ -77,6 +77,8 @@ namespace EntityFrameworkCore.Projectables.Services
|
||||
var nodeExpression = node.Expression switch {
|
||||
UnaryExpression { NodeType: ExpressionType.Convert, Type: { IsInterface: true } type, Operand: { } operand }
|
||||
when type.IsAssignableFrom(operand.Type)
|
||||
// This is an interface member. Operand contains the concrete (or at least more concrete) expression,
|
||||
// from which we can try to find the concrete member.
|
||||
=> operand,
|
||||
_ => node.Expression
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user