public SearchReturn Search(string keyword, string userName, int page, int pagesize) { using (var ctx = new MoviesContext()) { var temp = ctx.Search(keyword, userName); var searchResults = new SearchReturn() { ResultSize = temp.Count(), SearchResultsList = temp.Skip(page * pagesize).Take(pagesize).ToList() }; return(searchResults); } }
public IList <StringSearch> Search(string keyword) { using var ctx = new MoviesContext(); return(ctx.Search(keyword)); }