Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphic model binding example not working #18368

Closed
KoditkarVedant opened this issue May 18, 2020 · 1 comment
Closed

Polymorphic model binding example not working #18368

KoditkarVedant opened this issue May 18, 2020 · 1 comment
Labels
Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@KoditkarVedant
Copy link

Polymorphic model binding example given here always returns null result.

var modelTypeValue = bindingContext.ValueProvider.GetValue(modelKindName).FirstValue; in particular should return a value but always returns null.

I've added the binder like this in my startup.cs

services.AddMvc(options =>
{
      options.ModelBinderProviders.Insert(0, new DeviceModelBinderProvider());
}); 

Can anyone help me with this?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Rick-Anderson
Copy link
Contributor

Moved to Master issue for Custom Model Binding #16319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

No branches or pull requests

3 participants