public ModelValidateException(string key, string message) : this() { ValidateMessage.Add(new KeyValuePair <string, ModelErrorItem>(key, new ModelErrorItem(null, message))); }
public ModelValidateException(ModelStateDictionary modelState) : this() { modelState.SelectMany(m => m.Value.Errors.Select(me => new KeyValuePair <string, ModelErrorItem>(m.Key, new ModelErrorItem(me.Exception, me.ErrorMessage)))).ToList() .ForEach(x => ValidateMessage.Add(x)); }
public ModelValidateException(string key, ModelErrorItem modelError) : this() { ValidateMessage.Add(new KeyValuePair <string, ModelErrorItem>(key, modelError)); }