Exemple #1
0
 public int Delete(int id)
 {
     try
     {
         return(_addressRepo.DeleteById(id));
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemple #2
0
        public bool DeleteBuildingAdress(int addressId, int buildingId)
        {
            var count = _addressRepo.CountAddresses(buildingId);

            if (count > 1)
            {
                return(_addressRepo.DeleteById(addressId));
            }
            else
            {
                return(false);
            }
        }