예제 #1
0
        public ViewResult Index()
        {
            IndexPageViewModel model = new IndexPageViewModel()
            {
                CurrentAge         = DateHelper.GetYearDifference(_birthDate, DateTime.UtcNow),
                WorkExperiences    = _repository.GetWorkExperiences(),
                UniversityDiplomas = _repository.GetUniversityDiplomas(),
                PersonalWork       = _repository.GetPersonalWork()
            };

            return(View(model));
        }
예제 #2
0
        public WorkController(IResumeRepository resumeRepository, IWorkRepository workRepository)
        {
            /// resumeRepository contains the list of 'WorkModel'
            /// workRepository has access to the details of each 'WorkModel'
            /// we're going to save the aliases of each 'WorkModel',
            /// and use that against the parameter we get from request on the Standard action

            IEnumerable <WorkItemModel> workItems = resumeRepository.GetPersonalWork();

            _availableWorks = workItems.Select(x => x.Alias);

            _workRepository = workRepository;
        }