Beispiel #1
0
        public async Task <ActionResult> Import(string language)
        {
            if (string.IsNullOrEmpty(language))
            {
                throw new Exception("Import request without language");
            }
            List <RepositoryViewModel> repositories = await GitHubService.GetTopRepositories(language);

            RepositoryDAO.InsertOrUpdate(repositories);
            return(Redirect("/"));
        }