Exemple #1
0
 public void RegisterDbObject(HashedObject entityModelObject, DbModelObjectBase dbObject)
 {
     if (entityModelObject == null)
     {
         return;
     }
     if (dbObject.ObjectType == DbObjectType.Column)
     {
         return; // do not register columns, there are too many of them, and columns are not real standalone objects
     }
     _allObjects[entityModelObject] = dbObject;
 }//method
Exemple #2
0
 public DbObjectChange(DbModelObjectBase oldObject, DbModelObjectBase newObject,
     DbObjectChangeType? changeType = null, string notes = null)
 {
     var obj = newObject ?? oldObject;
       Util.Check(obj != null, "Fatal error in DbModelChange constructor: oldObject and newObject are both null.");
       ObjectType = obj.ObjectType;
       OldObject = oldObject;
       NewObject = newObject;
       Notes = notes;
       if(changeType == null)
     ChangeType = newObject == null ? DbObjectChangeType.Drop : (oldObject == null ? DbObjectChangeType.Add : DbObjectChangeType.Modify);
       else
     ChangeType = changeType.Value;
 }
Exemple #3
0
 internal DbObjectChange AddChange(DbModelObjectBase oldObj, DbModelObjectBase newObj, DbObjectChangeType? changeType = null, string notes = null)
 {
     var change = new DbObjectChange(oldObj, newObj, changeType, notes);
       this.Changes.Add(change);
       return change;
 }
Exemple #4
0
 public DbObjectChange AddChange(DbModelObjectBase oldObject, DbModelObjectBase newObject, string notes = null)
 {
     var change = new DbObjectChange(oldObject, newObject, null, notes);
       NonTableChanges.Add(change);
       return change;
 }