{"action":"closed","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/3472","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/3472/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/3472/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/3472/events","html_url":"https://github.com/aspnet/Mvc/issues/3472","id":114965548,"number":3472,"title":"ViewComponent with nullable argument(s) throws InvalidOperationException","user":{"login":"opiants","id":3430624,"avatar_url":"https://avatars.githubusercontent.com/u/3430624?v=3","gravatar_id":"","url":"https://api.github.com/users/opiants","html_url":"https://github.com/opiants","followers_url":"https://api.github.com/users/opiants/followers","following_url":"https://api.github.com/users/opiants/following{/other_user}","gists_url":"https://api.github.com/users/opiants/gists{/gist_id}","starred_url":"https://api.github.com/users/opiants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opiants/subscriptions","organizations_url":"https://api.github.com/users/opiants/orgs","repos_url":"https://api.github.com/users/opiants/repos","events_url":"https://api.github.com/users/opiants/events{/privacy}","received_events_url":"https://api.github.com/users/opiants/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-04T04:10:50Z","updated_at":"2015-11-04T17:24:21Z","closed_at":"2015-11-04T17:24:21Z","body":"Suppose we have this view component:\r\n\r\n    public class ExampleViewComponent\r\n    {\r\n        public Task<string> InvokeAsync(int? id)\r\n        {\r\n            return Task.FromResult(\"lorem ipsum\");\r\n        }\r\n    }\r\n\r\nUsing this view component in a razor file by calling any of the methods below:\r\n\r\n    @await Component.InvokeAsync(\"Example\", (int?)17)\r\n**or**\r\n\r\n    @await Component.InvokeAsync(\"Example\", 17)\r\n**or**\r\n\r\n    @await Component.InvokeAsync(\"Example\", null)\r\n\r\nwill throw:\r\n\r\n    InvalidOperationException: Could not find an 'Invoke' or 'InvokeAsync' method matching the parameters."}}