Пример #1
0
        // Seed an Evolution Database with Data
        public static void Seed(EvolutionInstallContext context)
        {
            Log.Info("Seeding Data...");

            // Create a Development Agency
            var developmentAgencyId = TriTechDevelopmentAgency.Create(context.TargetImplementation, context.ClassicDatabaseConnectionString);

            // Create a Testing Agency
            //TriTechTestingAgency.Create( context.TargetImplementation, context.ClassicDatabaseConnectionString );

            // Create a "Developer" user account in the Development Agency
            // Order is important so the account gets assigned to all existing Roles.
            DeveloperUserAccount.CreateInAgency(developmentAgencyId);
        }
        /// <summary>
        /// Create a new Evolution Installer instance.
        /// </summary>
        /// <param name="context">Contextual information about the install.</param>
        public EvolutionDatabaseInstaller(EvolutionInstallContext context)
        {
            // The Settings to use
            Context = context;

            // Define the Product Releases Here
            // This is how we make the installer aware of the Releases in our product.
            // We should be able to update from any version in this list to the Latest version of the
            // product. Note 4.7.1 is not in this list but is as far back as this installer can support.
            ProductReleases = new List <ProductRelease>
            {
                new Release4_8(context),
                new Release4_8_1(context)
            };
        }