protected override ConventionSet CreateConventionSet()
        {
            var conventions = base.CreateConventionSet();

            var sqlServerValueGenerationStrategyConvention = new SqlServerValueGenerationStrategyConvention();
            conventions.KeyAddedConventions.Add(sqlServerValueGenerationStrategyConvention);

            conventions.ForeignKeyAddedConventions.Add(sqlServerValueGenerationStrategyConvention);

            conventions.ForeignKeyRemovedConventions.Add(sqlServerValueGenerationStrategyConvention);

            conventions.ModelConventions.Add(sqlServerValueGenerationStrategyConvention);

            return conventions;
        }
        private static InternalModelBuilder createInternalModelBuilder()
        {
            var conventions = new ConventionSet();

            conventions.EntityTypeAddedConventions.Add(new PropertyDiscoveryConvention());
            conventions.EntityTypeAddedConventions.Add(new KeyDiscoveryConvention());

            var keyConvention = new KeyConvention();

            conventions.KeyAddedConventions.Add(keyConvention);
            conventions.ForeignKeyRemovedConventions.Add(keyConvention);

            var sqlServerValueGenerationStrategyConvention = new SqlServerValueGenerationStrategyConvention();
            conventions.ForeignKeyAddedConventions.Add(sqlServerValueGenerationStrategyConvention);
            conventions.ForeignKeyRemovedConventions.Add(sqlServerValueGenerationStrategyConvention);

            return new InternalModelBuilder(new Model(), conventions);
        }