Beispiel #1
0
        public List <StudentViewModel> GetAllStudents()
        {
            //return the List<TraineeViewModel> from TraineeDAL
            //Here you will need to use the methods you create in
            //Dive 1 in order to display the Height and proper cell phone display
            List <StudentViewModel> students = rsc.GetStudents();

            foreach (var item in students)
            {
                //for each item take the Height and CellNbr values,
                //use the HeightDisplay and PhoneDisplay methods
                //and store the returned values from the methods
                //into the HeightDisplay and PhoneDisplay properties of the item.
                //The DisplayHeight is done for you.
                item.DisplayHeight = HeightDisplay(item.Height);
            }
            return(students);
        }
 public List <StudentDAO> GetStudents()
 {
     return(rsc.GetStudents().ToList());
 }