Exemplo n.º 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 };
        }
Exemplo n.º 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
            });
        }