コード例 #1
0
ファイル: Helpers.cs プロジェクト: chrisjustman/eCommerce
        public Keyword RandomKeywordByCategory(string catname)
        {
            Keyword kw = new Keyword();

            int catid = catRepository.FindByName(catname).CategoryId;

            return kwRepository.GetByCatId(catid);
        }
コード例 #2
0
ファイル: Helpers.cs プロジェクト: chrisjustman/eCommerce
        public Keyword RandomKeyword(int total)
        {
            Keyword kw = new Keyword();
            Random rand = new Random();

            int a = rand.Next(1, total - 1);

            return kwRepository.GetById(a);
        }