public static void RemoveSchema(EntitySchema schema) { if ( !schemas.ContainsKey(schema.EntityType) ) { throw new SchemaNotFoundException(schema.EntityType); } schemas.Remove(schema.EntityType); if ( SchemaRemoved != null ) { SchemaRemoved(null, new SchemaCollectionChangedEventArgs { Schema = schema }); } }
public static void AddSchema(EntitySchema schema) { if ( schemas.ContainsKey(schema.EntityType) ) { throw new DuplicateSchemaException(schema.EntityType); } schemas[schema.EntityType] = schema; if ( SchemaAdded != null ) { SchemaAdded(null, new SchemaCollectionChangedEventArgs { Schema = schema }); } }