public IHttpActionResult GetByDateRange(int personId, DateTime startDate, DateTime endDate)
        {
            CalorieCountBLL bll      = new CalorieCountBLL();
            var             calories = bll.GetByDateRange(personId, startDate.Date, endDate.Date.AddDays(1));

            if (calories == null)
            {
                return(Content(HttpStatusCode.NotFound, "Calorie counts do not exist."));
            }
            else
            {
                return(Ok(calories));
            }
        }
        public IHttpActionResult Post(HUTModels.CalorieCount model)
        {
            CalorieCountBLL bll = new CalorieCountBLL();

            if (bll.Insert(model))
            {
                DateTime startDateTime = model.DatetimeEntered.Date;
                DateTime endDateTime   = model.DatetimeEntered.Date.AddDays(1);
                var      calories      = bll.GetByDateRange(model.PersonId, startDateTime, endDateTime);

                return(Ok(calories));
            }
            else
            {
                return(Content(HttpStatusCode.InternalServerError, "Problem inserting or returning calorie counts for the current day."));
            }
        }