public static void AddCourseRoles(this ClaimsIdentity identity, Dictionary <string, CourseRole> roles) { foreach (var role in roles) { identity.AddCourseRole(role.Key, role.Value); } }