Example #1
0
        /// <summary>
        /// 인자에 해당하는 KeywordLink 정보를 반환합니다.
        /// </summary>
        /// <param name="pageGroupCD"></param>
        /// <param name="cateCD"></param>
        /// <param name="tagGroupSeq">인자로 넘기지 않을 경우, seq 를 무시하고 pageGroupCD, cateCD 해당 데이터 모두 조회</param>
        /// <returns></returns>
        public List <ViewModelKeywordLink> GetKeywordLink(int pageGroupCD, int cateCD, int?tagGroupSeq)
        {
            var option = new TransactionOptions
            {
                // Isolation Level 에 주의
                IsolationLevel = IsolationLevel.ReadUncommitted,
                Timeout        = TransactionManager.DefaultTimeout
            };

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress, option))
            {
                List <ModelKeywordLink>     tmpList      = _daoGlobal.GetKeywordLink(pageGroupCD, cateCD, tagGroupSeq);
                List <ViewModelKeywordLink> returnResult = new List <ViewModelKeywordLink>();

                if (tmpList != null && tmpList.Count > 0)
                {
                    foreach (ModelKeywordLink n in tmpList)
                    {
                        ViewModelKeywordLink obj = new ViewModelKeywordLink();

                        obj.ImageURL    = n.ImageURL;
                        obj.Keyword     = n.Keyword;
                        obj.KeywordA    = n.KeywordA;
                        obj.KeywordB    = n.KeywordB;
                        obj.LinkURL     = n.LinkURL;
                        obj.PageGroupCD = n.PageGroupCD;
                        obj.TagGroupSeq = n.TagGroupSeq;

                        returnResult.Add(obj);
                    }
                }

                return(returnResult);
            }
        }