Example #1
0
        public IActionResult Playground(PlaygroundVM vm)
        {
            if (!ModelState.IsValid || vm == null)
            {
                return(View(vm));
            }

            ViewData["Message"] = $"IsCool!: {vm.IsCool}, IsSanctus: {vm.IsSanctified}, Run: {vm.RunToStore}, Color: {(vm.Color?.ToString()?.ToUpper() ?? "--")}";
            return(View(vm));
        }
Example #2
0
        public IActionResult Playground(int page = 0)
        {
            ViewData["Message"] = "Howdy.";

            var vm = new PlaygroundVM()
            {
                Page          = page,
                Name          = "John",
                Age           = 30,
                Email         = "*****@*****.**",
                Phone         = "",
                PublishedTime = DateTime.Now,
                Title         = "Lorem ipsum κάλος שָׁלוֹם",
                Color         = ColorType.Black
            };

            return(View(vm));
        }