Exemple #1
0
        public Keyword RandomKeywordByCategory(string catname)
        {
            Keyword kw = new Keyword();

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

            return kwRepository.GetByCatId(catid);
        }
Exemple #2
0
        public Keyword RandomKeyword(int total)
        {
            Keyword kw = new Keyword();
            Random rand = new Random();

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

            return kwRepository.GetById(a);
        }