Exemplo n.º 1
0
        public async Task UpdateSSHFingerPrint(SSHConnectionInfo info, string fingerprint)
        {
            var record = await SSHConnectionInfos.FirstOrDefaultAsync(x => x.Id == info.Id);

            if (record != null)
            {
                record.ExpectedFingerPrint = fingerprint;
                await SaveChangesAsync();
            }
        }
Exemplo n.º 2
0
        public async Task SavePassword(SSHConnectionInfo info, bool savePassword, string password)
        {
            var record = await SSHConnectionInfos.FirstOrDefaultAsync(x => x.Id == info.Id);

            if (record != null)
            {
                record.SavePassword = savePassword;
                record.RawPassword  = savePassword ? password : null;
                await SaveChangesAsync();
            }
        }