public static AppResponse Create(bool succeed, AppResponseBody body, AppError appError)
        {
            bool failedWithoutError = !succeed && appError == null;

            if (failedWithoutError)
            {
                throw new CoreModelException("AppError object must be passed when succeed is true");
            }

            return(new AppResponse {
                Succeed = succeed,
                Body = body,
                Error = appError
            });
        }
 public static AppResponse Failure(AppError error)
 {
     return(Create(false, null, error));
 }