Beispiel #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);
        }
Beispiel #2
0
 public static EncryptionKey ToEntity(this EncryptionKeyDto EncryptionKey)
 {
     return(Mapper.Map <EncryptionKey>(EncryptionKey));
 }