Beispiel #1
0
 public void DeleteTank(Tank tank)
 {
     try {
     TankRepository.Delete(tank);
     TankRepository.DbContext.CommitChanges();
       }
       catch (Exception e) {
     log.Error("Cound not delete tank. A dive probably references this tank");
     throw e;
       }
       return;
 }
Beispiel #2
0
        public virtual bool Equals(Tank obj)
        {
            if (obj == null) return false;

              if (Equals(Volume, obj.Volume) == false)
            return false;

              if (Equals(WorkingPressure, obj.WorkingPressure) == false)
            return false;

              return true;
        }
Beispiel #3
0
 public void Save(Tank tank)
 {
     try
       {
     TankRepository.SaveOrUpdate(tank);
     TankRepository.DbContext.CommitChanges();
       }
       catch (Exception e)
       {
     log.Error(("Unable to save tank"));
       }
 }