Пример #1
0
        public async Task Delete(long id)
        {
            var coletor = await _coletorRepository.SearchId(id);

            if (coletor != null)
            {
                if (_movimentoRepository.HasMovimByColetor(id))
                {
                    Notify("Existem movimentos com este coletor. Exclusão não permitida.");
                    return;
                }

                await _coletorRepository.Delete(coletor);
            }

            return;
        }