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