public async Task Upgrade(IVersionContext versionContext)
        {
            var adminRole = await _roleRepository.GetByNameAsync(Roles.Admin);

            var developerRole = await _roleRepository.GetByNameAsync(Roles.Developer);

            adminRole.Claims.AddRange(
                StandardClaims.GenerateClaimsByPages(
                    new string[] {
                "app-installation",
                "app-package"
            }));
            developerRole.Claims.AddRange(
                StandardClaims.GenerateClaimsByPages(
                    new string[] {
                "app-installation",
                "app-package"
            }));

            await _roleRepository.UpdateAsync(adminRole.Id, adminRole);

            await _roleRepository.UpdateAsync(developerRole.Id, developerRole);
        }
        public Task Upgrade(IVersionContext versionContext)
        {
            var adminRole = new Role
            {
                Id             = "5e6b506e52605e513cd02265",
                Name           = Roles.Admin,
                NormalizedName = Roles.Admin.ToUpper(System.Globalization.CultureInfo.CurrentCulture),
                DisplayName    = Roles.Admin,
                Claims         = new List <BaseClaim>
                {
                    StandardClaims.AccessCoreApp(Constants.CoreAppId)
                }
            };

            adminRole.Claims.AddRange(StandardClaims
                                      .GenerateClaimsByPages(new string[]
            {
                "apps-management",
                "databases-management",
                "pages-management",
                "page-builder",
                "menus",
                "role-claims",
                "dynamic-list-builder",
                "roles-management",
                "users-management",
                "database-form",
                "app-form",
                "dynamic-list-management",
                "standard-list-management",
                "role-form",
                "add-user-form",
                "user-form",
                "charts-management",
                "services-monitor",
                "service-logs",
                "service-dashboard",
                "backup-management",
                "chart-builder",
                "backup-builder",
                "backup-upload",
                "backup-restore",
                "user-info",
                "localization-builder",
                "localization-management"
            }));

            var developerRole = new Role
            {
                Id             = "5e6b506e52605e513cd02266",
                Name           = Roles.Developer,
                NormalizedName = Roles.Developer.ToUpper(System.Globalization.CultureInfo.CurrentCulture),
                DisplayName    = Roles.Developer,
                Claims         = new List <BaseClaim>
                {
                    StandardClaims.AccessCoreApp(Constants.CoreAppId)
                }
            };

            developerRole.Claims.AddRange(StandardClaims
                                          .GenerateClaimsByPages(new string[]
            {
                "pages-management",
                "page-builder",
                "dynamic-list-builder",
                "dynamic-list-management",
                "standard-list-management",
                "charts-management",
                "services-monitor",
                "service-logs",
                "service-dashboard",
                "chart-builder",
                "user-info",
                "localization-builder",
                "localization-management"
            }));

            var userRole = new Role
            {
                Id             = "5e6b506e52605e513cd02267",
                Name           = Roles.User,
                NormalizedName = Roles.User.ToUpper(System.Globalization.CultureInfo.CurrentCulture),
                DisplayName    = Roles.User,
                Claims         = new List <BaseClaim>
                {
                }
            };

            userRole.Claims.AddRange(StandardClaims
                                     .GenerateClaimsByPages(new string[]
            {
                "user-info"
            }));
            versionContext.InsertData(adminRole);
            versionContext.InsertData(developerRole);
            versionContext.InsertData(userRole);
            return(Task.CompletedTask);
        }