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); } }
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); }