Пример #1
0
        public ActionResult Create(categoria categoria)
        {
            ActionResult Result;

            try
            {
                if (ModelState.IsValid)
                {
                    CategoriasBLL oBLL = new CategoriasBLL();
                    oBLL.Create(categoria);
                    Result = RedirectToAction("Index");
                }
                else
                {
                    Result = View(categoria);
                }
                return(Result);
            }
            catch (Exception e)
            {
                return(View(categoria));
            }
        }