private bool IsOperationBoundTo(IEdmOperation operation, IEdmEntityType entityType) { if (!operation.IsBound) { return(false); } var bindingParameterType = operation.Parameters.First().Type; return(entityType.Equals( bindingParameterType.IsCollection() ? bindingParameterType.AsCollection().ElementType().Definition : bindingParameterType.Definition)); }
private bool IsOperationBoundTo(IEdmOperation operation, IEdmEntityType entityType) { if (!operation.IsBound) { return(false); } if (!operation.Parameters.Any()) { throw new InvalidOperationException($"No parameters for bound method {operation.Name}"); } var bindingParameterType = operation.Parameters.First().Type; return(entityType.Equals( bindingParameterType.IsCollection() ? bindingParameterType.AsCollection().ElementType().Definition : bindingParameterType.Definition)); }
private bool IsOperationBoundTo(IEdmOperation operation, IEdmEntityType entityType) { if (!operation.IsBound) { return false; } var bindingParameterType = operation.Parameters.First().Type; return entityType.Equals( bindingParameterType.IsCollection() ? bindingParameterType.AsCollection().ElementType().Definition : bindingParameterType.Definition); }