Example #1
0
 public bool Equals(EntityWithId other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other._id == _id;
 }
Example #2
0
 private static void ChangeStateOfEntity(ObjectStateManager objectStateManager, EntityWithId entity)
 {
     // TODO: Check for changs or deleted before moving this to Added/Modified
     objectStateManager.ChangeObjectState(entity, entity.Id == 0 ? EntityState.Added : EntityState.Modified);
 }