public HttpResponse Create(string id) { if (!this.IsUserSignedIn()) { return(this.Redirect("/Users/Login")); } SingleRepoViewModel repository = this.repositoryService.GetRepoById(id); return(this.View(repository)); }
public SingleRepoViewModel GetRepoById(string id) { Repository repository = this.db.Repositories.FirstOrDefault(r => r.Id == id); SingleRepoViewModel allReposViewModel = new SingleRepoViewModel() { Id = repository.Id, Name = repository.Name }; return allReposViewModel; }