コード例 #1
0
        public IActionResult NewAppointments([FromRoute] string when)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            DateTime dt = DateTime.Today;

            if (when != "now")
            {
                dt = Convert.ToDateTime(when);
            }

            int cnt = _pfd.GetNewAppointmentsCount(dt);

            return(Ok(cnt));
        }