Пример #1
0
 public ActionResult Create(Title body)
 {
     if (ModelState.IsValid && ApiConsumer.Post("/titles", body).IsSuccessStatusCode)
     {
         return(RedirectToAction("Index"));
     }
     return(View(body));
 }
Пример #2
0
        public ActionResult Create(Lawyer body)
        {
            if (ModelState.IsValid && ApiConsumer.Post("/lawyers", body).IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }

            prepareSelects();
            return(View(body));
        }