Exemplo n.º 1
0
        public string AddClient(AddClientDto addClientDto)
        {
            if (!addClientDto.Validate())
            {
                return("Validation error!");
            }

            var client = _clientConverter.AddClientDtoToClient(addClientDto);

            client.IsDeleted = false;
            _clientRepository.Add(client);

            return($"Client with id {client.Id} was succesfuly deleted");
        }
Exemplo n.º 2
0
 public async Task <int> AddClientAsync(AddClientDto addClientDto)
 {
     return(await _repository.AddAsync(_converter.AddClientDtoToClient(addClientDto)));
 }