AddOracleCollection<TKey, TRecord>(this IServiceCollection, string, OracleCollectionOptions?, ServiceLifetime)
This method registers an OracleCollection as VectorStoreCollection, with the OracleDataSource retrieved from the IServiceCollection.
Declaration
// C#
public static IServiceCollection AddOracleCollection(this IServiceCollection services, string name, OracleCollectionsOptions? options = null, ServiceLifetime lifetime = ServiceLifeTime.Singleton) where TKey : notnull where TRecord : class;
Parameters
-
servicesThe
IServiceCollectionto register theVectorStoreon. -
nameThe name of the collection.
-
optionsOptions 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
servicesparameter is null. -
The provided
nameparameter is null or empty.
InvalidOperationException: The service collection does not contain an OracleDataSource.