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

TypeConverterModelBinder cannot bind "byte" and "short" #1123

Closed
anfomin opened this issue Sep 11, 2014 · 1 comment
Closed

TypeConverterModelBinder cannot bind "byte" and "short" #1123

anfomin opened this issue Sep 11, 2014 · 1 comment
Assignees
Milestone

Comments

@anfomin
Copy link

anfomin commented Sep 11, 2014

Microsoft.AspNet.Mvc.ModelBinding.TypeConverterModelBinder should bind byte and short types.

I think method Microsoft.AspNet.Mvc.ModelBinding.ValueProviderResult.GetConverterDelegate(Type destinationType) should cover this types.

Minimal repro steps

  1. Create model with byte or short property.
  2. Try to databind this model.
@anfomin anfomin changed the title TypeConverterModelBinder can not bind "byte" or "short" TypeConverterModelBinder can not bind "byte" and "short" Sep 11, 2014
@pranavkm pranavkm added the bug label Sep 11, 2014
@danroth27 danroth27 added this to the 6.0.0-beta1 milestone Sep 16, 2014
@sornaks sornaks changed the title TypeConverterModelBinder can not bind "byte" and "short" TypeConverterModelBinder cannot bind "byte" and "short" Oct 12, 2014
sornaks pushed a commit that referenced this issue Oct 12, 2014
…ata to Enum parameter.

Fix: Using TypeConverter solves this problem.
Issue #1123 - TypeConverterModelBinder cannot bind "byte" and "short".
Fix: Modified code to use TypeConverter which can handle these scenarios.
sornaks pushed a commit that referenced this issue Oct 14, 2014
…ata to Enum parameter.

Fix: Using TypeConverter solves this problem.
Issue #1123 - TypeConverterModelBinder cannot bind "byte" and "short".
Fix: Modified code to use TypeConverter which can handle these scenarios.
sornaks pushed a commit that referenced this issue Oct 14, 2014
…data to Enum parameter.

Fix: Using TypeConverter solves this problem.
-Issue #1123 - TypeConverterModelBinder cannot bind "byte" and "short".
Fix: Modified code to use TypeConverter which can handle these scenarios.
-Removing the GetConverterDelegate method and making the code similar to the WebApi.
@sornaks
Copy link

sornaks commented Oct 14, 2014

Checked in - 5fa8a91

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants