public bool IsAppExists(string appId, Users actionUser)
 {
     try
     {
         RegisteredApps app = _bLLFacade.RegisterdAppActiveService.Get(appId);
         return(app != null);
     }
     catch (Exception ex)
     {
         _logger.Error(ex.Message, ex);
         return(false);
     }
 }
        public RegisteredAppValidityBO CheckRegisteredAppValidity(string appId, string appSecret)
        {
            RegisteredApps registeredApp = Get(appId);

            if (registeredApp == null)
            {
                return(new RegisteredAppValidityBO()
                {
                    IsValidApp = false,
                    ErrorMessage = "Invalid App Id",
                });
            }

            if (registeredApp.IsExternal)
            {
                return(new RegisteredAppValidityBO()
                {
                    IsValidApp = false,
                    ErrorMessage = "Invalid App",
                });
            }

            if (registeredApp.AppSecret != appSecret)
            {
                return(new RegisteredAppValidityBO()
                {
                    IsValidApp = false,
                    ErrorMessage = "Invalid App Secret",
                });
            }

            return(new RegisteredAppValidityBO()
            {
                ErrorMessage = "",
                IsValidApp = true,
            });
        }