Exemplo n.º 1
0
        public BMI Map(BMIDAO _CreateListToMap)
        {
            BMI _BMIToCreate = new BMI()

            {
                Height  = _CreateListToMap.Height,
                Weight  = _CreateListToMap.Weight,
                User_ID = _CreateListToMap.User_ID,
                ID      = _CreateListToMap.ID,
                Result  = _CreateListToMap.Result,
            };

            return(_BMIToCreate);
        }
Exemplo n.º 2
0
        public List <BMI> Map(List <BMIDAO> _BMIListToMap)
        {
            List <BMI> _BMIListToReturn = new List <BMI>();

            foreach (BMIDAO _BMIToMap in _BMIListToMap)
            {
                BMI _BMIToView = new BMI()
                {
                    Height  = _BMIToMap.Height,
                    Weight  = _BMIToMap.Weight,
                    User_ID = _BMIToMap.User_ID,
                    ID      = _BMIToMap.ID,
                    Result  = _BMIToMap.Result,
                };

                _BMIListToReturn.Add(_BMIToView);
            }
            return(_BMIListToReturn);
        }
Exemplo n.º 3
0
 public BMIViewModel()
 {
     SingleBMI = new BMI();
     BMIList   = new List <BMI>();
 }