예제 #1
0
        public JsonResponse Breathe(AirInputModel model)
        {
            var result = model.TakeABreath
                ? new AirViewModel { Text = "Breathe in!" }
                : new AirViewModel { Text = "Exhale!" };

            return new JsonResponse() { Model = result };
        }
예제 #2
0
        public JsonResponse Breathe(AirInputModel model)
        {
            var result = model.TakeABreath
                ? new AirViewModel {
                Text = "Breathe in!"
            }
                : new AirViewModel {
                Text = "Exhale!"
            };

            return(new JsonResponse()
            {
                Model = result
            });
        }