Blog.Logic.Core.AddressLogic.Delete C# (CSharp) Method

Delete() public method

public Delete ( int addressId ) : bool
addressId int
return bool
        public bool Delete(int addressId)
        {
            try
            {
                var db = _addressRepository.Find(a => a.AddressId == addressId, false).FirstOrDefault();
                if (db == null) return false;

                _addressRepository.Delete(db);
                return true;
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
        }
    }