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(); } }
public int SaveChanges() { return(_dbContext.SaveChanges()); }