public Task <IEnumerable <TModel> > ReadAsync <TModel>(ITableStorageSettings tableStorageSettings, Func <TableQuery <TModel>, TableQuery <TModel> > filter)
            where TModel : class, ITableEntity, new()
        {
            var reader = _tableStorageFactory.CreateReader <TModel>(tableStorageSettings);

            return(reader.ReadAsync(filter));
        }
 public AzureTableStorageInitializer(ITableStorageSettings settings)
 {
     if (string.IsNullOrEmpty(settings?.ConnectionString))
     {
         throw new ArgumentNullException(nameof(settings));
     }
     _settings = settings;
 }
Ejemplo n.º 3
0
 public IFilterableTableStorageReader <TModel> CreateReader <TModel>(ITableStorageSettings tableStorageSettings)
     where TModel : class, ITableEntity, new()
 {
     if (!_settings.AutoCreateMissingBindings)
     {
         throw new NotSupportedException("AutoCreateMissingBindings should be set to true.");
     }
     return(new FilterableTableStorageReader <TModel>(tableStorageSettings));
 }
Ejemplo n.º 4
0
 public TableStorageRepository(ITableStorageSettings storageSettings)
     : base(storageSettings)
 {
 }
 public AzureTableStorage(ITableStorageSettings config)
 {
     _configuration = config;
 }
Ejemplo n.º 6
0
 public FilterableTableStorageReaderTest()
 {
     _settings = new CosmosDbLocalEmulatorSettings("FilterableTableStorageReaderTest");
     sut       = new FilterableTableStorageReader <MyTestModel>(_settings);
     _myTestModelRepository = new TableStorageRepository <MyTestModel>(_settings);
 }
Ejemplo n.º 7
0
 public TableStorageRepositoryTest(string tableName = DefaultTableName)
 {
     Settings            = new CosmosDbLocalEmulatorSettings(tableName);
     RepositoryUnderTest = new TableStorageRepository <SomeTestEntity>(Settings);
 }
 public async Task ChangeSettings(ITableStorageSettings settings)
 {
     CreateStorageAccountFromConnectionString(settings.ConnectionString);
     await CreateTableAsync(settings.TableName);
 }
Ejemplo n.º 9
0
 public FilterableTableStorageReader(ITableStorageSettings storageSettings)
     : base(storageSettings)
 {
 }