public object ReturnBadRequest() { if (args != null) { return(DataMessage.Error(DataMessage.Message(new string[] { Message }, args, field))); } return(DataMessage.Error(DataMessage.Message(new string[] { Message }, field))); }
public static object ReturnBadRequest(ModelStateDictionary ModelState) { List <string> errors = new(); foreach (ModelStateEntry modelState in ModelState.Values) { foreach (ModelError error in modelState.Errors) { errors.Add(error.ErrorMessage); } } return(DataMessage.Error(DataMessage.Message(errors))); }
public static object ReturnBadRequest(string message) { return(DataMessage.Error(DataMessage.Message(new string[] { message }))); }