public async Task<RegistrationKeyEntity> CreateRegistrationKey() { var registrationKeyEntity = new RegistrationKeyEntity(); registrationKeyEntity.RegistrationKey = Guid.NewGuid().ToString(); registrationKeyEntity.ValidUntil = DateTime.UtcNow.AddHours(2); var operation = TableOperation.InsertOrReplace(registrationKeyEntity); await _registrationKeysTable.ExecuteAsync(operation); return registrationKeyEntity; }
public async Task <RegistrationKeyEntity> CreateRegistrationKey() { var registrationKeyEntity = new RegistrationKeyEntity(); registrationKeyEntity.RegistrationKey = Guid.NewGuid().ToString(); registrationKeyEntity.ValidUntil = DateTime.UtcNow.AddHours(2); var operation = TableOperation.InsertOrReplace(registrationKeyEntity); await _registrationKeysTable.ExecuteAsync(operation); return(registrationKeyEntity); }
public async Task UpdateRegistrationKey(RegistrationKeyEntity registrationKey) { var operation = TableOperation.InsertOrReplace(registrationKey); await _registrationKeysTable.ExecuteAsync(operation); }