// GET: My/Contacts public ActionResult Index(MemberFilterClass? c) { List<MemberFilter> ff = DbContext.MemberFilters.OrderBy(x => x.Title).ToList(); if (c != null) { ff = ff .Where(x => x.FilterClass == c.Value) .OrderBy(x => x.Title) .ToList(); } return View(ff); }
public ActionResult CreateFilter(MemberFilterClass c) { MemberFilter f = new MemberFilter() { FilterClass = c, Category = FilterCategories.Contacts, AntecedentId = new Guid(CurrentUser.Id), FilterId = Guid.NewGuid() }; return View(f); }