Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | InvalidModelStateResult(ModelStateDictionary, ApiController) | Initializes a new instance of the InvalidModelStateResult class. | 
| .jpeg) | InvalidModelStateResult(ModelStateDictionary, Boolean, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the InvalidModelStateResult class. | 
See Also
InvalidModelStateResult Class
System.Web.Http.Results Namespace
Return to top
InvalidModelStateResult Constructor (ModelStateDictionary, ApiController)
Initializes a new instance of the InvalidModelStateResult class.
Syntax
public InvalidModelStateResult(
    ModelStateDictionary modelState,
    ApiController controller
)
public:
InvalidModelStateResult(
    ModelStateDictionary^ modelState,
    ApiController^ controller
)
new : 
        modelState:ModelStateDictionary *
        controller:ApiController -> InvalidModelStateResult
Public Sub New (
    modelState As ModelStateDictionary,
    controller As ApiController
)
Parameters
- modelState 
 Type: System.Web.Http.ModelBinding.ModelStateDictionary- The model state to include in the error. 
- controller 
 Type: System.Web.Http.ApiController- The controller from which to obtain the dependencies needed for execution. 
Return to top
InvalidModelStateResult Constructor (ModelStateDictionary, Boolean, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)
Initializes a new instance of the InvalidModelStateResult class.
Syntax
public InvalidModelStateResult(
    ModelStateDictionary modelState,
    bool includeErrorDetail,
    IContentNegotiator contentNegotiator,
    HttpRequestMessage request,
    IEnumerable<MediaTypeFormatter> formatters
)
public:
InvalidModelStateResult(
    ModelStateDictionary^ modelState,
    bool includeErrorDetail,
    IContentNegotiator^ contentNegotiator,
    HttpRequestMessage^ request,
    IEnumerable<MediaTypeFormatter^>^ formatters
)
new : 
        modelState:ModelStateDictionary *
        includeErrorDetail:bool *
        contentNegotiator:IContentNegotiator *
        request:HttpRequestMessage *
        formatters:IEnumerable<MediaTypeFormatter> -> InvalidModelStateResult
Public Sub New (
    modelState As ModelStateDictionary,
    includeErrorDetail As Boolean,
    contentNegotiator As IContentNegotiator,
    request As HttpRequestMessage,
    formatters As IEnumerable(Of MediaTypeFormatter)
)
Parameters
- modelState 
 Type: System.Web.Http.ModelBinding.ModelStateDictionary- The model state to include in the error. 
- includeErrorDetail 
 Type: System.Boolean- true if the error should include exception messages; otherwise, false. 
- contentNegotiator 
 Type: System.Net.Http.Formatting.IContentNegotiator- The content negotiator to handle content negotiation. 
- request 
 Type: System.Net.Http.HttpRequestMessage- The request message which led to this result. 
- formatters 
 Type: System.Collections.Generic.IEnumerable<MediaTypeFormatter>- The formatters to use to negotiate and format the content. 
Return to top