AddOracleCollection<TKey, TRecord>(IServiceCollection, string, Func<IServiceProvider, string>, Func<IServiceProvider, OracleCollectionsOptions>?, ServiceLifetime)

This method registers an OracleCollection as VectorStoreCollection, with the specified connection string provider and service lifetime.

Declaration

// C#
public static IServiceCollection AddOracleCollection<TKey, TRecord>(this IServiceCollection services, string name, Func<IServiceProvider, string> connectionStringProvider, Func<IServiceProvider, OracleCollectionsOptions>? optionsProvider = null, ServiceLifetime lifetime = ServiceLifeTime.Singleton) where TKey : notnull where TRecord : class

Parameters

  • services

    The IServiceCollection to register the VectorStore on.

  • name

    The name of the collection.

  • connectionStringProvider

    The connection string provider.

  • optionsProvider

    The optional options provider to further configure the vector store.

  • lifetime

    The service lifetime for the store. Defaults to ServiceLifetime.Singleton.

Return Value

Returns the service collection.

Exceptions

InvalidArgumentException:
  • The provided connectionStringProvider or services parameter is null.
  • The provided name parameter is null or empty.