Пример #1
0
 public ModelStateException(System.Web.Http.ModelBinding.ModelStateDictionary modelState, string message = "Bad request body.")
     : base(message, ReasonBadRequestBody)
 {
     base.LogAsError  = true;
     ModelStateErrors = modelState.AsString();               //WebHelper method
     base.Data[KeyModelStateErrors] = this.ModelStateErrors; //to automatically include in ToLogString() representation
 }