From 82b06f562d6beceee4460ad9cd921baf2b7a53e3 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Wed, 8 Aug 2018 11:01:41 -0700 Subject: [PATCH] Fix for odata filters https://github.com/Azure/azure-powershell/issues/6814 --- .../ApiManagementClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs index 951384493551..ad73291e4d6c 100644 --- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs +++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs @@ -529,7 +529,7 @@ public IList ApiByName(PsApiManagementContext context, strin context.ServiceName, new Rest.Azure.OData.ODataQuery { - Filter = string.Format("contains('{0}',properties/displayName)", name) + Filter = string.Format("properties/displayName eq '{0}'", name) }), nextLink => Client.Api.ListByServiceNext(nextLink)); @@ -1269,7 +1269,7 @@ public IList ProductList (PsApiManagementContext context var query = new Rest.Azure.OData.ODataQuery(); if (!string.IsNullOrWhiteSpace(title)) { - query.Filter = string.Format("contains('{0}',properties/displayName)", title); + query.Filter = string.Format("properties/displayName eq '{0}'", title); } var results = ListPagedAndMap(