private void ById(int status) { var result = CoreState.ById(status); if (result.Result != null && !string.IsNullOrEmpty(result.Result.Message)) { ParseResult(result.Result); } else if (result.ErrorResult != null) { ParseErrorResult(result.ErrorResult); } HttpContextHelper.Accessor.HttpContext.Response.StatusCode = (int)result.ResponseStatus; }
public static ResponseData GetResponse(this ControllerBase cBase, int code) { var model = CoreState.ById(code); return(GetResult(cBase, model)); }