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.

Support ModeStatelDictionary.AddModelError overload that does not require ModelMetadata arg #6102

Closed
@lencharest

Description

@lencharest

The ModeStatelDictionary.AddModelError overload that takes 3 arguments uses the 3rd arg (ModelMetadata) only in very limited circumstances. Nevertheless, the 3rd arg may not be null. In my case, I'm forced to instantiate a ModelMetadata that I know is useless.

Please support a 2 argument variation that omits the ModelMetadata for the common case where the caller knows that the exception (2nd arg) is not one of the types that get special treatment:

public void AddModelError(string key, Exception exception) { ... }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions