public ActionResult Index(SpellFilterViewModel filter) { var viewModel = new SpellListViewModel() { Spells = filter.HasValues ? _spellRepo.List(filter) : _spellRepo.List() }; return(View(viewModel)); }
public ActionResult Index() { List <Spell> spells = _spellRepo.List(); return(View(spells)); }