dotnet/aspnetcore
GitHub で見るAdd support for TypeConverter on propertes/parameters in MVC
Open
#8,857 opened on 2019年3月27日
affected-fewarea-mvcenhancementfeature-model-bindinghelp wantedseverity-minor
Repository metrics
- Stars
- (37,933 stars)
- PR merge metrics
- (平均マージ 16d 9h) (30d で 258 merged PRs)
説明
Discussed here originally: https://github.com/aspnet/AspNetCore/issues/8846
This is a really simple way to implement model binding behaviour, and is a totally appropriate thing to do when you have a single field in the request that maps to a complex object.
It would be easy for us to support this because we already have infrastructure that users model binding to call a type converter. We already use type converters defined on types, what this would add would be the ability to use types like List<> and apply the attribute to provide a converter.