Exemple #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());
        }
Exemple #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());
        }
Exemple #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);
            }
        }