public JsonErrorResult(string errorMessage = null, string redirect = null, bool allowGet = false) { Data = new JsonResultObject { success = false, message = errorMessage ?? string.Empty, redirect = redirect ?? string.Empty, data = string.Empty, }; if (allowGet) { JsonRequestBehavior = JsonRequestBehavior.AllowGet; } }
public JsonSuccessResult(object data = null, bool allowGet = false, string message = null, Enum status = null) { Data = new JsonResultObject { success = true, data = data ?? string.Empty, redirect = string.Empty, message = message ?? string.Empty, status = status == null ? "" : status.ToString(), }; if (allowGet) { JsonRequestBehavior = JsonRequestBehavior.AllowGet; } }