Exemplo n.º 1
0
        public void Delete(IDatabaseAccessor accessor)
        {
            if (accessor == null)
            {
                throw new ArgumentNullException("accessor");
            }
            var collection = new SQLScriptCollection(accessor);

            this.Schema.FillDeleteScriptCollection(collection);
            accessor.ExecuteSQLCommand(collection.ExportCommands());
        }
Exemplo n.º 2
0
        public void Delete(IDatabaseAccessor accessor)
        {
            ThrowNotReadyException();

            if (accessor == null)
            {
                throw new ArgumentNullException("accessor");
            }
            var collection = new SQLScriptCollection(accessor);

            Delete(collection);
            accessor.ExecuteSQLCommand(collection.ExportCommands());
        }
Exemplo n.º 3
0
        public void Save(IDatabaseAccessor accessor, bool fresh = false)
        {
            if (accessor == null)
            {
                throw new ArgumentNullException("accessor");
            }
            var collection = new SQLScriptCollection(accessor);

            this.Schema.FillSaveScriptCollection(collection);
            accessor.ExecuteSQLCommand(collection.ExportCommands());
            if (fresh)
            {
                this.Fresh(accessor);
            }
        }