//vsoalnki 13-11-2018
        public BizResponseClass UpdateLimitRule(long LimitRuleMasterId, LimitRuleMasterReq Request, long userid)
        {
            try
            {
                var template = _LimitRuleMaster.GetSingle(i => i.Id == LimitRuleMasterId);
                if (Request != null)
                {
                    template.Status      = Convert.ToInt16(ServiceStatus.Active);
                    template.UpdatedDate = UTC_To_IST();
                    template.CreatedDate = template.CreatedDate; //UTC_To_IST();
                    template.CreatedBy   = template.CreatedBy;   // userid;
                    template.UpdatedBy   = userid;

                    template.MaxAmount  = Request.MaxAmount;
                    template.MinAmount  = Request.MinAmount;
                    template.Name       = Request.Name;
                    template.TrnType    = Request.TrnType;
                    template.WalletType = Request.WalletType;

                    _LimitRuleMaster.Update(template);

                    return(new BizResponseClass {
                        ReturnCode = enResponseCode.Success, ReturnMsg = EnResponseMessage.RecordUpdated, ErrorCode = enErrorCode.Success
                    });
                }
                return(new BizResponseClass {
                    ReturnCode = enResponseCode.Fail, ReturnMsg = EnResponseMessage.InvalidInput, ErrorCode = enErrorCode.InvalidInput
                });
            }
            catch (Exception ex)
            {
                HelperForLog.WriteErrorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, this.GetType().Name, ex);
                throw ex;
            }
        }
        public async Task <IActionResult> UpdateLimitRule([FromBody] LimitRuleMasterReq Request, long LimitRuleMasterId)
        {
            BizResponseClass Response = new BizResponseClass();

            try
            {
                ApplicationUser user = new ApplicationUser(); user.Id = 1;
                //ApplicationUser user = await _userManager.GetUserAsync(HttpContext.User);
                if (user == null)
                {
                    Response.ReturnCode = enResponseCode.Fail;
                    Response.ReturnMsg  = EnResponseMessage.StandardLoginfailed;
                    Response.ErrorCode  = enErrorCode.StandardLoginfailed;
                }
                else
                {
                    var accessToken = await HttpContext.GetTokenAsync("access_token");

                    Response = _communicationService.UpdateLimitRule(LimitRuleMasterId, Request, user.Id);
                }
                var     respObj     = JsonConvert.SerializeObject(Response);
                dynamic respObjJson = JObject.Parse(respObj);
                return(Ok(respObjJson));
            }
            catch (Exception ex)
            {
                return(BadRequest(new BizResponseClass {
                    ReturnCode = enResponseCode.InternalError, ReturnMsg = ex.ToString(), ErrorCode = enErrorCode.Status500InternalServerError
                }));
            }
        }