Exemple #1
0
 /// <summary>
 /// Json通用返回格式:返回失败
 /// </summary>
 /// <param name="code">错误代码</param>
 /// <param name="message">错误信息(默认为"Unknown error")</param>
 /// <returns>
 /// Json格式 : {code:-1,data:"",count:-1,message:Unknown error}
 /// </returns>
 protected virtual HttpResponseMessage ResponseFail(int code = -1, string message = "Unknown error") => HttpResponseMessageResultFormat.ResponseFail(code, message);
Exemple #2
0
 /// <summary>
 /// Json通用返回格式:返回失败
 /// </summary>
 /// <param name="message">错误信息(默认为"Unknown error")</param>
 /// <returns>
 /// Json格式 : {code:-1,data:"",count:-1,message:Unknown error}
 /// </returns>
 protected virtual HttpResponseMessage ResponseFail(string message = "Unknown error") => HttpResponseMessageResultFormat.ResponseFail(message);