コード例 #1
0
        public IActionResult Echo()
        {
            ResponseTest result = new ResponseTest()
            {
                Message = "The service is available!"
            };

            return(Ok(result));
        }
コード例 #2
0
        public IActionResult Version()
        {
            ResponseTest result = new ResponseTest()
            {
                Message = string.Format($"API Version is { _appConfig.Value.ApiVersion }")
            };

            return(Ok(result));
        }
コード例 #3
0
 public virtual MvcMailMessage TestPage(ResponseTest tresp)
 {
     ViewData.Model = tresp;
     //ViewBag.Data = someObject;
     return(Populate(x =>
     {
         x.Subject = tresp.Name + (tresp.WillFeed.Value ? " Перезвоните мне" : " Записаться на пробный урок");
         x.ViewName = "TestPage";
         x.To.Add("*****@*****.**");
     }));
 }
コード例 #4
0
        public ViewResult TestPage(ResponseTest tresp)
        {
            UserMailer.TestPage(tresp).Send();

            if (ModelState.IsValid)
            {
                //responseFeedback.Submit();

                return(View("Thanks", tresp));
            }
            else
            {
                return(View());
            }
        }