// making list of bodyPart model from bodypartDAO public List <bodyPartModel> map(List <bodyPartDAO> _dataBodyPart) { // making new list of routineWorkout model List <bodyPartModel> _pressBodyPart = new List <bodyPartModel>(); foreach (bodyPartDAO _dBodyPart in _dataBodyPart) { bodyPartModel _pBodyPart = new bodyPartModel(); _pBodyPart.bodyPartID = _dBodyPart.bodyPartID; _pBodyPart.bodyPartName = _dBodyPart.bodyPartName; _pressBodyPart.Add(_pBodyPart); } return(_pressBodyPart); }
public viewModel() { singleExercise = new exerciseModel(); exerciseList = new List <exerciseModel>(); singleBodyPart = new bodyPartModel(); bodyPartList = new List <bodyPartModel>(); singlePerson = new personModel(); personList = new List <personModel>(); singleRoutine = new routineModel(); routineList = new List <routineModel>(); singleRoutineWorkout = new routineWorkoutModel(); routineWorkoutList = new List <routineWorkoutModel>(); singleRole = new roleModel(); roleList = new List <roleModel>(); singleWeights = new weightsModel(); weightsList = new List <weightsModel>(); }