{"action":"created","issue":{"url":"https://api.github.com/repos/OData/WebApi/issues/1380","repository_url":"https://api.github.com/repos/OData/WebApi","labels_url":"https://api.github.com/repos/OData/WebApi/issues/1380/labels{/name}","comments_url":"https://api.github.com/repos/OData/WebApi/issues/1380/comments","events_url":"https://api.github.com/repos/OData/WebApi/issues/1380/events","html_url":"https://github.com/OData/WebApi/issues/1380","id":313662549,"number":1380,"title":"[feature/netcore] ODataQueryOptions.Initialize should use another constructor for ODataQueryOptionParser","user":{"login":"maximpashuk","id":5028850,"avatar_url":"https://avatars2.githubusercontent.com/u/5028850?v=4","gravatar_id":"","url":"https://api.github.com/users/maximpashuk","html_url":"https://github.com/maximpashuk","followers_url":"https://api.github.com/users/maximpashuk/followers","following_url":"https://api.github.com/users/maximpashuk/following{/other_user}","gists_url":"https://api.github.com/users/maximpashuk/gists{/gist_id}","starred_url":"https://api.github.com/users/maximpashuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximpashuk/subscriptions","organizations_url":"https://api.github.com/users/maximpashuk/orgs","repos_url":"https://api.github.com/users/maximpashuk/repos","events_url":"https://api.github.com/users/maximpashuk/events{/privacy}","received_events_url":"https://api.github.com/users/maximpashuk/received_events","type":"User","site_admin":false},"labels":[{"id":614080787,"url":"https://api.github.com/repos/OData/WebApi/labels/P4","name":"P4","color":"006b75","default":false},{"id":163068796,"url":"https://api.github.com/repos/OData/WebApi/labels/bug","name":"bug","color":"b60205","default":true},{"id":767111348,"url":"https://api.github.com/repos/OData/WebApi/labels/feature/netcore","name":"feature/netcore","color":"28bfb2","default":false}],"state":"open","locked":false,"assignee":{"login":"biaol-odata","id":24885233,"avatar_url":"https://avatars2.githubusercontent.com/u/24885233?v=4","gravatar_id":"","url":"https://api.github.com/users/biaol-odata","html_url":"https://github.com/biaol-odata","followers_url":"https://api.github.com/users/biaol-odata/followers","following_url":"https://api.github.com/users/biaol-odata/following{/other_user}","gists_url":"https://api.github.com/users/biaol-odata/gists{/gist_id}","starred_url":"https://api.github.com/users/biaol-odata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biaol-odata/subscriptions","organizations_url":"https://api.github.com/users/biaol-odata/orgs","repos_url":"https://api.github.com/users/biaol-odata/repos","events_url":"https://api.github.com/users/biaol-odata/events{/privacy}","received_events_url":"https://api.github.com/users/biaol-odata/received_events","type":"User","site_admin":false},"assignees":[{"login":"biaol-odata","id":24885233,"avatar_url":"https://avatars2.githubusercontent.com/u/24885233?v=4","gravatar_id":"","url":"https://api.github.com/users/biaol-odata","html_url":"https://github.com/biaol-odata","followers_url":"https://api.github.com/users/biaol-odata/followers","following_url":"https://api.github.com/users/biaol-odata/following{/other_user}","gists_url":"https://api.github.com/users/biaol-odata/gists{/gist_id}","starred_url":"https://api.github.com/users/biaol-odata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biaol-odata/subscriptions","organizations_url":"https://api.github.com/users/biaol-odata/orgs","repos_url":"https://api.github.com/users/biaol-odata/repos","events_url":"https://api.github.com/users/biaol-odata/events{/privacy}","received_events_url":"https://api.github.com/users/biaol-odata/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-04-12T10:14:58Z","updated_at":"2018-04-16T18:43:55Z","closed_at":null,"author_association":"NONE","body":"I am using **Microsoft.AspNetCore.OData 7.0.0-Nightly201804111241** to play with ```ODataUriResolver.EnableNoDollarQueryOptions``` setting.\r\n\r\nIf I register in DI ODataUriResolver with EnableNoDollarQueryOptions = true this not work - ODataQueryOptions parameter in controller don't understand '?top=1', understand only '?$top=1'.\r\n\r\nI tried to investigate this and I found that in method [ODataQueryOptions.Initialize()](https://github.com/OData/WebApi/blob/feature/netcore/src/Microsoft.AspNet.OData.Shared/Query/ODataQueryOptions.cs#L60-L64) constructor for ODataQueryOptionParser not passed IServiceProvider argument (context.RequestContainer should be passed as last argument I think).\r\n\r\n\r\nBecause of this ODataQueryOptionParser.Configuration property became not DI-aware.\r\nAnd later in [ODataQueryOptionParser.TryGetQueryOption](https://github.com/OData/odata.net/blob/master/src/Microsoft.OData.Core/UriParser/ODataQueryOptionParser.cs#L621) method Configuration property used to get EnableNoDollarQueryOptions option value - and it always false.\r\n\r\nSo please use another constructor for ODataQueryOptionParser that has IServiceProvider argument."},"comment":{"url":"https://api.github.com/repos/OData/WebApi/issues/comments/381708050","html_url":"https://github.com/OData/WebApi/issues/1380#issuecomment-381708050","issue_url":"https://api.github.com/repos/OData/WebApi/issues/1380","id":381708050,"user":{"login":"biaol-odata","id":24885233,"avatar_url":"https://avatars2.githubusercontent.com/u/24885233?v=4","gravatar_id":"","url":"https://api.github.com/users/biaol-odata","html_url":"https://github.com/biaol-odata","followers_url":"https://api.github.com/users/biaol-odata/followers","following_url":"https://api.github.com/users/biaol-odata/following{/other_user}","gists_url":"https://api.github.com/users/biaol-odata/gists{/gist_id}","starred_url":"https://api.github.com/users/biaol-odata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biaol-odata/subscriptions","organizations_url":"https://api.github.com/users/biaol-odata/orgs","repos_url":"https://api.github.com/users/biaol-odata/repos","events_url":"https://api.github.com/users/biaol-odata/events{/privacy}","received_events_url":"https://api.github.com/users/biaol-odata/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T18:43:55Z","updated_at":"2018-04-16T18:43:55Z","author_association":"CONTRIBUTOR","body":"@maximpashuk Support for optional $-sign for query is only available in master branch of [WebAPI](https://github.com/OData/WebApi/commit/a1bb6ff62d29b70017ce8d17d373a475a3d06f1b). And it is not released yet. \r\nBranch feature/netcore is under active development and doesn't have the parity with the WebAPI/master branch for this feature yet."}}
{"actor":{"display_login":"biaol-odata"}}