コード例 #1
0
ファイル: AirController.cs プロジェクト: nieve/fubumvc
        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
            });
        }