Пример #1
0
 public bool AddNewRole(UserRole UserRole)
 {
     try
     {
         _entities.UserRole.Add(UserRole);
         _entities.SaveChanges();
     }
     catch
     {
         return false;
     }
     return true;
 }
Пример #2
0
 public ActionResult AddNewUserRole(UserRole userRole)
 {
     if (applicationDAO.AddNewRole(userRole))
         return RedirectToAction("UserRoleList");
     else
     return View("AddNewUserRole");
 }