AddOracleCollection<TKey, TRecord>(IServiceCollection, string, string, OracleCollectionOptions?, ServiceLifetime)

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

Declaration

// C#
public static IServiceCollection AddOracleCollection<TKey, TRecord>(this IServiceCollection services,string name,string connectionString,OracleCollectionOptions? options = default,ServiceLifetime lifetime = ServiceLifetime.Singleton)where TKey : notnullwhere TRecord : class

Parameters

  • services

    The IServiceCollection to register the VectorStore on.

  • name

    The name of the collection.

  • connectionString

    The connection string.

  • options

    Options 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 services parameter is null.
  • The provided connectionString or name parameter is null or empty.