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; }
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; }
public void Save(Tank tank) { try { TankRepository.SaveOrUpdate(tank); TankRepository.DbContext.CommitChanges(); } catch (Exception e) { log.Error(("Unable to save tank")); } }