Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Can not pass nullable to ViewComponent Invoke method #3211

@RiteshPahwa

Description

@RiteshPahwa

Beta7 Calling a method like:

 public async Task<IViewComponentResult> InvokeAsync(int id, bool? commentAllowed, int? commentCount)

Generates error

InvalidOperationException: Could not find an 'Invoke' or 'InvokeAsync' method matching the parameters.

Microsoft.AspNet.Mvc.ViewComponents.DefaultViewComponentInvoker.<InvokeAsync>d__4.MoveNext()

From View as

@await Component.InvokeAsync("Comment", Model.Id, Model.CommentAllowed, Model.CommentCount) 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions