public Keyword RandomKeywordByCategory(string catname) { Keyword kw = new Keyword(); int catid = catRepository.FindByName(catname).CategoryId; return kwRepository.GetByCatId(catid); }
public Keyword RandomKeyword(int total) { Keyword kw = new Keyword(); Random rand = new Random(); int a = rand.Next(1, total - 1); return kwRepository.GetById(a); }