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

            FR_L5AC_GCD_1251 functionReturn = new FR_L5AC_GCD_1251();

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

                functionReturn = Execute(Connection, Transaction, 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 { }

                throw new Exception("Exception occured in method cls_Get_CommunityData", ex);
            }
            return(functionReturn);
        }
        protected static FR_L5AC_GCD_1251 Execute(DbConnection Connection, DbTransaction Transaction, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_L5AC_GCD_1251();

            var community = ORM_HEC_CMT_Community.Query.Search(Connection, Transaction, new ORM_HEC_CMT_Community.Query()
            {
                Tenant_RefID = securityTicket.TenantID,
                IsDeleted    = false,
                IsCommunityOperatedByThisTenant = true
            }).Single();

            var membershipTypes = ORM_HEC_CMT_Community_OfferedMembershipType.Query.Search(Connection, Transaction, new ORM_HEC_CMT_Community_OfferedMembershipType.Query()
            {
                Tenant_RefID    = securityTicket.TenantID,
                IsDeleted       = false,
                Community_RefID = community.HEC_CMT_CommunityID
            }).ToArray();

            returnValue.Result = new L5AC_GCD_1251()
            {
                CommunityBaseURL = community.CommunityServicesBaseURL,
                CommunityITL     = community.HealthcareCommunityITL,
            };

            var rolesORM = ORM_HEC_CMT_OfferedRole.Query.Search(Connection, Transaction, new ORM_HEC_CMT_OfferedRole.Query()
            {
                Tenant_RefID    = securityTicket.TenantID,
                IsDeleted       = false,
                Community_RefID = community.HEC_CMT_CommunityID
            }).ToArray();


            var types = new List <L5AC_GCD_1251_MembershipType>();

            foreach (var membershipType in membershipTypes)
            {
                types.Add(new L5AC_GCD_1251_MembershipType()
                {
                    HealthcareCommunityOfferedMembershipTypesITL = membershipType.HealthcareCommunityOfferedMembershipTypesITL,
                    IsAvailableFor_Doctors = membershipType.IsAvailableFor_Doctors,
                    IsAvailableFor_Tenants = membershipType.IsAvailableFor_Tenants,
                    TypeDisplayName        = membershipType.OfferedMembershipType_DisplayName
                });
            }

            var roles = new List <L5AC_GCD_1251_OfferedRole>();

            foreach (var roleORM in rolesORM)
            {
                roles.Add(new L5AC_GCD_1251_OfferedRole()
                {
                    CommunityRoleITL                   = roleORM.CommunityRoleITL,
                    GlobalPropertyMatchingID           = roleORM.GlobalPropertyMatchingID,
                    IsUniqueOverAllGroupsPerSubscriber = roleORM.IsUniqueOverAllGroupsPerSubscriber
                });
            }

            var group = ORM_HEC_CMT_CommunityGroup.Query.Search(Connection, Transaction, new ORM_HEC_CMT_CommunityGroup.Query()
            {
                IsDeleted          = false,
                IsPrivate          = false,
                Tenant_RefID       = securityTicket.TenantID,
                CommunityGroupCode = "FAVORITES"
            }).Single();

            returnValue.Result.Group = new L5AC_GCD_1251_Group()
            {
                GroupCode = group.CommunityGroupCode,
                GroupITL  = group.HealthcareCommunityGroupITL
            };

            returnValue.Result.MembershipTypes = types.ToArray();

            return(returnValue);

            #endregion UserCode
        }