예제 #1
0
        // GET: api/Studies
        public IEnumerable <StudyViewModel> GetStudies()
        {
            var studyListViewModel = new List <StudyViewModel>();
            var mapper             = new StudyMapper();

            var studyList = db.GetStudyList();

            foreach (var s in studyList)
            {
                studyListViewModel.Add(mapper.GetStudyViewModel(s));
            }
            return(studyListViewModel);
        }