Пример #1
0
        public BMR Map(BMRDAO _CreateListToMap)
        {
            BMR _BMRToCreate = new BMR()
            {
                Height  = _CreateListToMap.Height,
                Weight  = _CreateListToMap.Weight,
                Age     = _CreateListToMap.Age,
                Gender  = _CreateListToMap.Gender,
                User_ID = _CreateListToMap.User_ID,
                ID      = _CreateListToMap.ID,
                Result  = _CreateListToMap.Result,
            };

            return(_BMRToCreate);
        }
Пример #2
0
        public WLCDAO Map(WLC _CreateListToMap, BMR _BMRToMap)
        {
            WLCDAO _WLCToCreate = new WLCDAO()
            {
                Gender   = _BMRToMap.Gender,
                Age      = _BMRToMap.Age,
                Height   = _BMRToMap.Height,
                Weight   = _BMRToMap.Weight,
                Goal     = _CreateListToMap.Goal,
                GoalTime = _CreateListToMap.GoalTime,
                User_ID  = _BMRToMap.User_ID,
                ID       = _CreateListToMap.ID,
                Result   = _CreateListToMap.Result,
            };

            return(_WLCToCreate);
        }
Пример #3
0
        public List <BMR> Map(List <BMRDAO> _BMRListToMap)
        {
            List <BMR> _BMRListToReturn = new List <BMR>();

            foreach (BMRDAO _BMRToMap in _BMRListToMap)
            {
                BMR _BMRToView = new BMR()
                {
                    Height  = _BMRToMap.Height,
                    Weight  = _BMRToMap.Weight,
                    Age     = _BMRToMap.Age,
                    Gender  = _BMRToMap.Gender,
                    User_ID = _BMRToMap.User_ID,
                    ID      = _BMRToMap.ID,
                    Result  = _BMRToMap.Result,
                };

                _BMRListToReturn.Add(_BMRToView);
            }
            return(_BMRListToReturn);
        }
Пример #4
0
 public BMRViewModel()
 {
     SingleBMR = new BMR();
     BMRList   = new List <BMR>();
 }