Пример #1
0
 public int Add(SystemRole role)
 {
     if (role != null)
     {
         sr.RoleName        = role.RoleName;
         sr.RoleDescription = role.RoleDescription;
         srs.Add(sr);
         int result = srs.SaveChanges();
         return(result);
     }
     else
     {
         return(0);
     }
 }
Пример #2
0
        public void DeleteRole()
        {
            SystemRoleService srsl = new SystemRoleService();

            srsl.Delete(1);
            int result = srsl.SaveChanges();

            Assert.IsTrue(result == 1);
        }