public async Task <IPersonalData> GetAsync(string id) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); var rowKey = PersonalDataEntity.GenerateRowKey(id); return(await _tableStorage.GetDataAsync(partitionKey, rowKey)); }
public async Task <IPersonalData> ScanAndFindAsync(Func <IPersonalData, bool> func) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); return (await _tableStorage.FirstOrNullViaScanAsync(partitionKey, dataToSearch => dataToSearch.FirstOrDefault(pa => func(pa)))); }
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 static PersonalDataEntity Create(IPersonalData src) { var result = new PersonalDataEntity { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(src.Id), Email = src.Email, Regitered = src.Regitered }; result.Update(src); return(result); }
public static PersonalDataEntity Create(IPersonalData src) { var result = new PersonalDataEntity { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(src.Id), Email = src.Email, Regitered = src.Regitered }; result.Update(src); return result; }
public async Task <IEnumerable <IPersonalData> > GetAsync(IEnumerable <string> id) { var partitionKey = PersonalDataEntity.GeneratePartitionKey(); return(await _tableStorage.GetDataAsync(partitionKey, id)); }
public Task SaveAsync(IPersonalData personalData) { var newEntity = PersonalDataEntity.Create(personalData); return(_tableStorage.InsertAsync(newEntity)); }