示例#1
0
        public ActionResult <BmiActionDto> CreateBmiAction(CreateBmiAction newAction)
        {
            var action = _mapper.Map <BmiAction>(newAction);

            _repository.AddBmiAction(action);

            return(Ok());
        }
示例#2
0
        private CreateBmiAction CreateAction(double height, double weight, double bmi)
        {
            var action = new CreateBmiAction
            {
                Bmi     = bmi,
                Height  = height,
                Weight  = weight,
                Created = DateTime.UtcNow
            };

            return(action);
        }