public JsonNetResult GetAvailableCredits(string accountId)
        {
            string creditsAvailableString = String.Empty;

            #region (Plan A) Get data from Redis Cache

            try
            {
                //First we attempt to get the user from the Redis Cache

                IDatabase cache = CoreServices.RedisConnectionMultiplexers.RedisMultiplexer.GetDatabase();

                string hashKey   = "credits";
                string hashField = "credits:available:" + accountId;

                var redisValue = cache.HashGet(hashKey, hashField);

                //con.Close();

                if (redisValue.HasValue)
                {
                    creditsAvailableString = JsonConvert.DeserializeObject <String>(redisValue);
                }
            }
            catch (Exception e)
            {
                var error = e.Message;
            }

            #endregion

            if (String.IsNullOrEmpty(creditsAvailableString))
            {
                #region (Plan B) Get data from WCF

                //If a failure occurs, or the redis cache is empty we get the user from the WCF service
                var accountCommerceServiceClient = new AccountCommerceService.AccountCommerceServiceClient();

                try
                {
                    accountCommerceServiceClient.Open();
                    creditsAvailableString = accountCommerceServiceClient.GetCredits(accountId.ToString(), Common.SharedClientKey).ToString();

                    //Close the connection
                    WCFManager.CloseConnection(accountCommerceServiceClient);
                }
                catch (Exception e)
                {
                    #region Manage Exception

                    string exceptionMessage = e.Message.ToString();

                    var    currentMethod       = System.Reflection.MethodBase.GetCurrentMethod();
                    string currentMethodString = currentMethod.DeclaringType.FullName + "." + currentMethod.Name;

                    // Abort the connection & manage the exception
                    WCFManager.CloseConnection(accountCommerceServiceClient, exceptionMessage, currentMethodString);

                    #endregion
                }

                #endregion
            }

            JsonNetResult jsonNetResult = new JsonNetResult();
            jsonNetResult.Formatting = Newtonsoft.Json.Formatting.Indented;
            jsonNetResult.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Local; //<-- Convert UTC times to LocalTime
            jsonNetResult.Data = creditsAvailableString;

            return(jsonNetResult);
        }