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 : classParameters
servicesThe
IServiceCollectionto register theVectorStoreon.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.