protected override void OnModelCreating(ModelBuilder modelBuilder)
 {
     PostCategoryConfigurations.Config(modelBuilder);
     CategoryConfigurations.Config(modelBuilder);
     PostConfigurations.Config(modelBuilder);
     MessageConfigurations.Config(modelBuilder);
     AccountConfigurations.Config(modelBuilder);
 }
Exemple #2
0
        AzureStorageAddressingSettings GetAddressing(ReadOnlySettings settings, string connectionString)
        {
            var addressing = settings.GetOrDefault <AzureStorageAddressingSettings>() ?? new AzureStorageAddressingSettings();

            if (settings.TryGet <AccountConfigurations>(out var accounts) == false)
            {
                accounts = new AccountConfigurations();
            }

            var shouldUseAccountNames = settings.TryGet(WellKnownConfigurationKeys.UseAccountNamesInsteadOfConnectionStrings, out object _);

            addressing.SetAddressGenerator(addressGenerator);
            addressing.RegisterMapping(accounts.defaultAlias, accounts.mappings, shouldUseAccountNames);
            addressing.Add(new AccountInfo(QueueAddress.DefaultStorageAccountAlias, connectionString), false);

            return(addressing);
        }
 internal AccountRoutingSettings(AccountConfigurations accounts)
 {
     this.accounts = accounts;
 }