public ActionResult UpdateIndexSongs(int genreId) { var viewModel = new ListSongsViewModel() { Songs = this.service.GetSongsByGenreId(genreId) }; return(PartialView("_ListSongsPartial", viewModel)); }
public ActionResult SearchFor(SearchSongBindingModel model) { var results = new HashSet <Song>(); if (model.MatchWithSongName) { results.UnionWith(this.service.GetSongsNameContaining(model.SearchFor)); } if (model.MatchWithUploaderName) { results.UnionWith(this.service.GetSongsUploaderNameContaining(model.SearchFor)); } if (model.MatchWithUploaderUserName) { results.UnionWith(this.service.GetSongsUploaderUserNameContaining(model.SearchFor)); } var viewModel = new ListSongsViewModel() { Songs = results }; return(this.PartialView("_ListSongsPartial", viewModel)); }