You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now can use the [Feature()] attribute on a razor PageModel and we use the ITypeFeatureProvider to retrieve the feature related to a given PageModel. The problem is that when no PageModel is defined for a razor page, e.g. only @functions handlers, the related page ModelType is then of type Object.
In that case ITypeFeatureProvider.GetFeatureForDependency(pageModelType) throw an exception.
To Reproduce
Steps to reproduce the behavior:
Create a Razor @page without defining a PageModel (e.g. only @functions handlers).
Start the app and see _typeFeatureProvider failing.
Expected behavior
A Razor @page without defining a PageModel should work.
Fixed on my side, will push a PR
The text was updated successfully, but these errors were encountered:
Describe the bug
We now can use the
[Feature()]
attribute on a razorPageModel
and we use theITypeFeatureProvider
to retrieve the feature related to a givenPageModel
. The problem is that when noPageModel
is defined for a razor page, e.g. only@functions
handlers, the related pageModelType
is then of typeObject
.In that case
ITypeFeatureProvider.GetFeatureForDependency(pageModelType)
throw an exception.To Reproduce
Steps to reproduce the behavior:
PageModel
(e.g. only@functions
handlers)._typeFeatureProvider
failing.Expected behavior
A Razor @page without defining a
PageModel
should work.Fixed on my side, will push a PR
The text was updated successfully, but these errors were encountered: