public async Task DeleteAsync <T>() where T : SmsSenderSettingsBase, new() { var partitionKey = SmsSenderSettingsEntity.GeneratePartitionKey(); var defaultValue = SmsSenderSettingsBase.CreateDefault <T>(); var rowKey = SmsSenderSettingsEntity.GenerateRowKey(defaultValue); await _tableStorage.DeleteIfExistAsync(partitionKey, rowKey); }
public async Task <T> GetAsync <T>() where T : SmsSenderSettingsBase, new() { var partitionKey = SmsSenderSettingsEntity.GeneratePartitionKey(); var defaultValue = SmsSenderSettingsBase.CreateDefault <T>(); var rowKey = SmsSenderSettingsEntity.GenerateRowKey(defaultValue); var entity = await _tableStorage.GetDataAsync(partitionKey, rowKey); return(entity == null ? defaultValue : entity.GetSmsSenderSettings <T>()); }