public bool IsHOF(string number) { var hands = GetHands(null, 10000, null) .Where(h => !_secrets.HOFExclusions().Contains(h.TableName)) .OrderByDescending(h => h.Amount) .Take(20); foreach (var h in hands) { if (h.Number.Equals(number)) { return(true); } } return(false); }
public ActionResult HOF(string tableName = "") { var list = new List <SelectListItem> { new SelectListItem { Value = "10/20", Text = "10/20" }, new SelectListItem { Value = "100/200", Text = "100/200" } }; foreach (SelectListItem item in list) { if (item.Value == tableName) { item.Selected = true; } } ViewBag.Tables = list; if (string.IsNullOrEmpty(tableName) || tableName.Equals("10/20")) { var hands = _pokerRepository.GetHands(null, 10000, null) .Where(h => !(h.TableName != null && _secrets.HOFExclusions().Contains(h.TableName))) .OrderByDescending(h => h.Amount).Take(20).ToList(); return(View(_pokerRepository.AddArtToHands(hands))); } else { if (tableName.Equals("100/200")) { var hands = _pokerRepository.GetHands(null, 10000, null) .Where(h => (h.TableName != null && h.TableName.Contains("100/200"))) .OrderByDescending(h => h.Amount).Take(20).ToList(); return(View(_pokerRepository.AddArtToHands(hands))); } return(View()); } }