Exemple #1
0
        public ActionResult Create(Department newDepartment)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    servicesClient.AddDepartment(newDepartment);
                    return(RedirectToAction("Index", "Department"));
                }

                // TODO: Add insert logic here

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }