public NpcTypeEditViewModel(MySqlConnection connection, EQEmu.Database.QueryConfig config, NpcPropertyTemplateManager templates)
        {
            _connection = connection;
            _config = config;
            _templates = templates;

            _modelMappings = Npc.LoadModelMappings("modelmapping.xml");

            if (connection != null && connection.State == System.Data.ConnectionState.Open)
            {
                _npcs = new NpcAggregatorDatabase(connection, config);
            }
            else
            {
                _npcs = new NpcAggregatorLocal(config);
            }
            _npcs.Created();

            _npcs.NPCs.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(NPCs_CollectionChanged);
            Models.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Models_CollectionChanged);
        }
        public SpawnExtractorTabViewModel(MySqlConnection connection,EQEmu.Database.QueryConfig config,NpcPropertyTemplateManager templates)
        {
            _connection = connection;
            _config = config;
            _templates = templates;
            _startId = 0;
            Zone = "";
            ZoneVersion = 0;

            if (connection != null && connection.State == System.Data.ConnectionState.Open)
            {
                _npcs = new NpcAggregatorDatabase(connection, config);
            }
            else
            {
                _npcs = new NpcAggregatorLocal(config);
            }
            _npcs.Created();

            if (connection != null && connection.State == System.Data.ConnectionState.Open)
            {
                _spawngroups = new SpawnGroupAggregatorDatabase(connection, config);
            }
            else
            {
                _spawngroups = new SpawnGroupAggregatorLocal(config);
            }
            _spawngroups.Created();
        }