public async Task DeleteAsync(long id)
        {
            var clienteBase = await GetByIdAsync(id);

            if (clienteBase == null)
            {
                throw new Exception("Não é possivel atualizar o cliente, o cliente não está cadastrado");
            }

            _clienteRepository.DeleteById(id);
        }
Beispiel #2
0
        private async void MovementsInDatabase(List <BetEntity> listBets)
        {
            foreach (var item in listBets)
            {
                await _betRepository.DeleteById(item.Id);
            }
            var result = await _rouletteRepository.GetById(listBets.Select(x => x.RouletteId).FirstOrDefault());

            result.Result.Open       = false;
            result.Result.ClosedDate = DateTime.Now;
            await _rouletteRepository.UpdateDocument(result.Result);
        }
        public override void Delete(string id)
        {
            var document = _userCodeRepsitory.FindById(id);

            if (document == null)
            {
                return;
            }
            var folderPath = Path.GetDirectoryName(document.filePath);

            Directory.Delete(folderPath, true);
            _userCodeRepsitory.DeleteById(id);
        }
Beispiel #4
0
 public void DeleteById(int id)
 {
     _repository.DeleteById(id);
 }
Beispiel #5
0
 public async Task Delete(string Id)
 {
     await _autorGenercioRepository.DeleteById(Id);
 }
Beispiel #6
0
 public void DeleteUser(string id)
 {
     _userRepository.DeleteById(id);
 }
Beispiel #7
0
 public async Task Delete(string id)
 {
     await autorGenericoRepository.DeleteById(id);
 }
Beispiel #8
0
 public async Task Delete(string id)
 {
     await _libroRepository.DeleteById(id);
 }
Beispiel #9
0
        public void Invoke(string taskId)
        {
            var objectId = new ObjectId(taskId);

            taskRepository.DeleteById(objectId);
        }
Beispiel #10
0
 public virtual void Delete(string id)
 {
     _repository.DeleteById(id);
 }