示例#1
0
        public async Task <ClientDTO> CreateAsync(ClientDTO model)
        {
            var domain = _converter.ConvertTo <ClientDTO, Domain.Client>(model);
            await _clientRepository.CreateAsync(domain);

            await _clientRepository.SaveChangesAsync();

            model.Id = domain.Id;

            return(model);
        }
示例#2
0
 public T ConvertToModel <T>(Entity entity)
 {
     return(_entityConverter.ConvertTo <T>(entity));
 }