示例#1
0
        public void Configure(DomainOptions options)
        {
            Type conventionType = Assembly.GetEntryAssembly().GetExportedTypes().FirstOrDefault(this.IsValidDatabaseConvention);

            if (conventionType != null)
            {
                DatabaseConvention database = (DatabaseConvention)Activator.CreateInstance(conventionType);

                database.Configure(options);
            }
        }
示例#2
0
        public void Configure(DomainOptions options)
        {
            Type conventionType = Assembly.GetEntryAssembly().GetExportedTypes().FirstOrDefault(this.IsValidDatabaseConvention);

            if (conventionType == null)
            {
                throw new InvalidOperationException("DatabaseConvention implementation not found.");
            }

            DatabaseConvention database = (DatabaseConvention)Activator.CreateInstance(conventionType);

            database.Configure(options);
        }