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();
            }
        }
Beispiel #2
0
 public void Add(SystemClaimType registro)
 {
     dbContext.SystemClaims.Add(registro);
     dbContext.SaveChanges();
 }