protected static FR_L5RL_GRFR_1004 Execute(DbConnection Connection, DbTransaction Transaction, P_L5RL_GRFR_1004 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_L5RL_GRFR_1004();


            ORM_CMN_PER_Religion.Query religionQuery = new ORM_CMN_PER_Religion.Query();
            religionQuery.CMN_PER_ReligionID = Parameter.CMN_PER_ReligionID;
            religionQuery.IsDeleted          = false;
            religionQuery.Tenant_RefID       = securityTicket.TenantID;
            List <ORM_CMN_PER_Religion> religions = ORM_CMN_PER_Religion.Query.Search(Connection, Transaction, religionQuery);
            if (religions != null && religions.Count != 0)
            {
                L5RL_GRFT_0942 religionItem = new L5RL_GRFT_0942();

                ORM_CMN_PER_Religion religion = religions[0];
                religionItem.CMN_PER_ReligionID       = religion.CMN_PER_ReligionID;
                religionItem.Religion_Name            = religion.Religion_Name;
                religionItem.GlobalPropertyMatchingID = religion.GlobalPropertyMatchingID;
                religionItem.Country_ISOCode_Alpha2   = Get_CountryISO_For_Religion(Connection, Transaction, securityTicket, religion);
                returnValue.Result          = new L5RL_GRFR_1004();
                returnValue.Result.Religion = religionItem;
            }
            //Put your code here
            return(returnValue);

            #endregion UserCode
        }
        ///<summary>
        /// Method Invocation of wrapper classes
        ///<summary>
        protected static FR_L5RL_GRFR_1004 Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L5RL_GRFR_1004 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            bool cleanupConnection  = Connection == null;
            bool cleanupTransaction = Transaction == null;

            FR_L5RL_GRFR_1004 functionReturn = new FR_L5RL_GRFR_1004();

            try
            {
                if (cleanupConnection == true)
                {
                    Connection = CSV2Core_MySQL.Support.DBSQLSupport.CreateConnection(ConnectionString);
                    Connection.Open();
                }
                if (cleanupTransaction == true)
                {
                    Transaction = Connection.BeginTransaction();
                }

                functionReturn = Execute(Connection, Transaction, Parameter, securityTicket);

                #region Cleanup Connection/Transaction
                //Commit the transaction
                if (cleanupTransaction == true)
                {
                    Transaction.Commit();
                }
                //Close the connection
                if (cleanupConnection == true)
                {
                    Connection.Close();
                }
                #endregion
            }
            catch (Exception ex)
            {
                try
                {
                    if (cleanupTransaction == true && Transaction != null)
                    {
                        Transaction.Rollback();
                    }
                }
                catch { }

                try
                {
                    if (cleanupConnection == true && Connection != null)
                    {
                        Connection.Close();
                    }
                }
                catch { }

                Guid errorID = Guid.NewGuid();
                ServerLog.Instance.Fatal("Application error occured. ErrorID = " + errorID, ex);
                throw new Exception("Exception occured in method cls_Get_Religion_For_ReligionID", ex);
            }
            return(functionReturn);
        }