public override void AddCommand(StorageCommand command) { if (_locked) { throw new Exception("The mediator is locked"); } if (command.Mode == StorageCommandMode.Entity) { if (!_builders.ContainsKey(command.EntityType)) { _builders.Add(command.EntityType, new SqlScriptBuilder(new Mapper(command.EntityType, _ps), _ps)); } _list.Add(command); } else { if (!_mtmRelationships.ContainsKey(command.ManyToManyProperty)) { List <EntityBase> l = new List <EntityBase>(); l.AddRange(command.Entities); _mtmRelationships.Add(command.ManyToManyProperty, l); } else { foreach (EntityBase e in command.Entities) { if (!_mtmRelationships[command.ManyToManyProperty].Contains(e)) { _mtmRelationships[command.ManyToManyProperty].Add(e); } } } } }
public override void AddCommand(StorageCommand command) { throw new Exception("The method or operation is not implemented."); }
public abstract void AddCommand(StorageCommand command);