public async Task <bool> Destroy(Guid id)
        {
            var result = await _addressRepository.Destroy(id);

            if (result == 0)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public async Task <bool> Destroy(Guid id)
        {
            // verificar se tem turmas relacionadas

            var address = await _addressRepository.GetAddressBySchoolId(id);

            if (address != null)
            {
                await _addressRepository.Destroy(address.Id);
            }

            await _schoolRepository.Destroy(id);

            return(true);
        }