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.

ArgumentNullException when using [BindProperty] on a private property #6400

Closed
@sebastienros

Description

@sebastienros

This is not supported, but the result shouldn't be an exception with this trace:

ArgumentNullException: Value cannot be null.
 Parameter name: metadata
Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer.GetExplorerForExpression(ModelMetadata metadata, Func<object, object> modelAccessor)
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ExpressionMetadataProvider.FromLambdaExpression<TModel, TResult>(Expression<Func<TModel, TResult>> expression, ViewDataDictionary<TModel> viewData, IModelMetadataProvider metadataProvider)
Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpressionProvider.CreateModelExpression<TModel, TValue>(ViewDataDictionary<TModel> viewData, Expression<Func<TModel, TValue>> expression)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions