public JsonResult AddNewRole(RoleViewModel role) { Role r = new Role() { Id = Guid.NewGuid(), RoleName = role.RoleName }; _roleService.AddRole(r); _roleService.SaveChanges(); return Json("Added"); }
public void AddRole(Role role) { _roleRepository.Add(role); }