示例#1
0
        public virtual async Task <EncryptionKeyDto> AddEncryptionKeyAsync(EncryptionKeyDto encryptionKeyDto)
        {
            var encryptionKeyEntity = encryptionKeyDto.ToEntity();
            var encryptionKey       = await Repository.AddEncryptionKeyAsync(encryptionKeyEntity);

            encryptionKeyDto = encryptionKey.ToModel();
            await AuditEventLogger.LogEventAsync(new EncryptionKeyRequestedEvent());

            return(encryptionKeyDto);
        }
示例#2
0
 public static EncryptionKey ToEntity(this EncryptionKeyDto EncryptionKey)
 {
     return(Mapper.Map <EncryptionKey>(EncryptionKey));
 }