public ActionResult Index() { DashboardViewModel dashboardViewModel = new DashboardViewModel() { Technologies = _technologyRepository.GetAll().Where(t => t.Projects.Count > 0), Projects = _projectsRepository.GetAll() }; return(View(dashboardViewModel)); }
public ActionResult Cv() { CvViewModel cvViewModel = new CvViewModel() { Contact = _contactRepository.GetAll().FirstOrDefault(), PrivateInformation = _privateInformationRepository.GetAll().FirstOrDefault(), Achievements = _achievementRepository.GetAll().ToList(), AdditionalInfos = _additionalInformationRepository.GetAll().ToList(), Educations = _educationRepository.GetAll().ToList(), EmploymentHistories = _employmentHistoryRepository.GetAll().ToList(), Projects = _projectsRepository.GetAll().ToList(), Technologies = _technologyRepository.GetAll().ToList() }; return(View(cvViewModel)); }
public HttpResponseMessage Get() { try { TechnologyRepository rep = new TechnologyRepository(); IEnumerable <Technology> list = Mapper.ToList <Technology>(rep.GetAll()); if (list != null && list.Count() > 0) { return(Request.CreateResponse(HttpStatusCode.OK, list)); } else { return(Request.CreateResponse(HttpStatusCode.NoContent)); } } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message)); } }