示例#1
0
        public ActionResult CreateClaim(SystemClaimTypeVM vm)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    SystemClaimType registro = new SystemClaimType();
                    registro.Name = vm.Name;
                    claimManager.Add(registro);

                }

                return RedirectToAction("Index");
            }
            catch (Exception e)
            {
                ModelState.AddModelError("", e.Message);
                return View();
            }
        }
示例#2
0
 public void Add(SystemClaimType registro)
 {
     dbContext.SystemClaims.Add(registro);
     dbContext.SaveChanges();
 }