//  update number with name that are given
 public void PutEmergency(Emergency emergency)
 {
     if (!repository.Update(emergency))
     {
         throw new ArgumentNullException("Opps ! There is no Emergency with name #" + emergency.Name + " !");
     }
 }
 public void Post(Emergency newEmergency)
 {
     if (newEmergency == null)
     {
         throw new ArgumentNullException("Opps ! Number object is null that was sended !");
     }
     emergencies.Add(newEmergency);
 }
 public bool Update(Emergency updatedEmergency)
 {
     if (updatedEmergency == null  )
     {
         throw new ArgumentNullException("Opps ! Emergency object is null that was sended !");
     }
     else
     {
         var emergency = this.GetByName(updatedEmergency.Name);
         if (emergency.Name == "")
         {
             return false;
         }
         emergency.Number = updatedEmergency.Number;
         return true;
     }
 }
 public void PostEmergency(Emergency newEmergency)
 {
     repository.Post(newEmergency);
 }