public ActionResult Details(int?id) { var repository = _service.GetById(id.Value); var repos = _service.GetAllRepositoriesFavorites(); foreach (var item in repos) { if (item.Id == repository.Id) { repository.Favorite = true; } } repository.Contribuitores.AddRange(_service.GetContribuitors(repository.Owner.Login, repository.Name)); return(View(repository)); }