ExpressionExtensions.TryGetIndexerArguments Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If the given a method-call expression represents a call to indexer on the entity, then this method extracts the entity expression and property name.
public static bool TryGetIndexerArguments (this System.Linq.Expressions.MethodCallExpression methodCallExpression, Microsoft.EntityFrameworkCore.Metadata.IModel model, out System.Linq.Expressions.Expression entityExpression, out string propertyName);
public static bool TryGetIndexerArguments (this System.Linq.Expressions.MethodCallExpression methodCallExpression, Microsoft.EntityFrameworkCore.Metadata.IModel model, out System.Linq.Expressions.Expression? entityExpression, out string? propertyName);
static member TryGetIndexerArguments : System.Linq.Expressions.MethodCallExpression * Microsoft.EntityFrameworkCore.Metadata.IModel * Expression * string -> bool
<Extension()>
Public Function TryGetIndexerArguments (methodCallExpression As MethodCallExpression, model As IModel, ByRef entityExpression As Expression, ByRef propertyName As String) As Boolean
Parameters
- methodCallExpression
- MethodCallExpression
The method-call expression for indexer.
- model
- IModel
The model to use.
- entityExpression
- Expression
The extracted entity access expression.
- propertyName
- String
The accessed property name.
Returns
true
if the method-call was for indexer; false
otherwise.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework