Example #1
0
        public static BLAResponse <T> MakeSuccessData <T>(T Data) where T : class
        {
            var response = new BLAResponse <T>();

            response.Data      = Data;
            response.IsSuccess = true;
            return(response);
        }
Example #2
0
        public static BLAResponse <object> MakeErrorData(string message, int errorCode)
        {
            var response = new BLAResponse <object>();

            response.IsSuccess    = false;
            response.ErrorCode    = errorCode;
            response.ErrorMessage = message;
            return(response);
        }
Example #3
0
        public static BLAResponse <T> MakeErrorData <T>(string message, int errorCode, T errorList) where T : class
        {
            var response = new BLAResponse <T>();

            response.IsSuccess    = false;
            response.ErrorCode    = errorCode;
            response.ErrorMessage = message;
            response.Data         = errorList;
            return(response);
        }