예제 #1
0
        public static void CreateUserPermission(string UserRole, string GlobalId)
        {
            using (MessagingCRMEntities dbContext = new MessagingCRMEntities())
            {
                AspNetRole permission = new AspNetRole
                {
                    Id   = GlobalId.ToString(),
                    Name = UserRole
                };

                dbContext.AspNetRoles.Add(permission);
                dbContext.SaveChanges();
            }
        }
예제 #2
0
 public int SaveChanges()
 {
     return(_dbContext.SaveChanges());
 }