コード例 #1
0
        public ActionResult <IEnumerable <Appointment> > Get(Guid uuid)
        {
            try
            {
                var result = appointmentManager.GetAppointmentsForUser(uuid);

                if (!result.Any())
                {
                    return(Ok($"No appointments exist for this user"));
                }

                return(Ok(result));
            }
            catch (InvalidOperationException exception)
            {
                return(StatusCode(404, exception.Message));
            }
        }