public IEnumerable <Book> GetSpecificBooksType(int type) { IEnumerable <Book> books; if (type == 1) { books = _repo.GetAudiobooks(""); } else if (type == 2) { books = _repo.GetEbooks(""); } else { return(null); } return(books.OrderBy(b => b.ReleaseDate)); }
public string GetOnlyAudiobooks(String searchString) { return(JsonConvert.SerializeObject(_repo.GetAudiobooks(searchString).ToArray())); }
public PartialViewResult GetAudiobooks(string searchString) { return(PartialView(partialView, _repo.GetAudiobooks(searchString))); }