Beispiel #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");
        }
 public async Task <int> AddClientAsync(AddClientDto addClientDto)
 {
     return(await _repository.AddAsync(_converter.AddClientDtoToClient(addClientDto)));
 }