public async Task <IPersonalData> GetAsync(string id) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(await _tableStorage.GetDataAsync(partitionKey, rowKey)); }
public Task UpdateAsync(IPersonalData personalData) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(personalData.Id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Update(personalData); return itm; })); }
public Task ChangeContactPhoneAsync(string id, string phoneNumber) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.ContactPhone = phoneNumber; return itm; })); }
public Task ChangeAddressAsync(string id, string address) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Address = address; return itm; })); }
public Task ChangeZipAsync(string id, string zip) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Zip = zip; return itm; })); }
public Task ChangeCountryAsync(string id, string country) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Country = country; return itm; })); }
public Task ChangeLastNameAsync(string id, string lastName) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.LastName = lastName; return itm; })); }
public Task UpdateGeolocationDataAsync(string id, string countryCode, string city) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(_tableStorage.ReplaceAsync(partitionKey, rowKey, itm => { itm.Country = countryCode; itm.City = city; return itm; })); }