AddKeyedOracleCollection<TKey, TRecord>(IServiceCollection, object?, string, Func<IServiceProvider, string>, Func<IServiceProvider, OracleVectorCollectionOptions>?, ServiceLifetime )
This method registers a keyed OracleCollection<TKey, TRecord> as VectorStoreCollection, with the specified connection string provider and service lifetime.
Declaration
// C#
public static IServiceCollection AddKeyedOracleCollection<TKey, TRecord>(this IServiceCollection services, object? serviceKey, string name, Func<IServiceProvider, string> connectionStringProvider, Func<IServiceProvider, OracleVectorCollectionOptions>? optionsProvider = null, ServiceLifetime lifetime = ServiceLifeTime.Singleton) where TKey : notnull where TRecord : classParameters
TKeyThe key type of
OracleCollection<TKey, TRecord>.TRecordThe record type of
OracleCollection<TKey, TRecord>.servicesThe
IServiceCollectionto register theVectorStoreon.serviceKeyThe key to associate with the vector collection.
nameThe name of the collection.
connectionStringProviderThe connection string provider.
optionsProviderThe optional options provider to further configure the vector store.
lifetimeThe service lifetime for the store. Defaults to
ServiceLifetime.Singleton.
Return Value
Returns the service collection.
Exceptions
InvalidArgumentException:
- The provided
connectionStringProviderorservicesparameter is null. - The provided
nameparameter is null or empty.