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
servicesThe
IServiceCollectionto register theVectorStoreon.nameThe name of the collection.
connectionStringThe connection string.
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
connectionStringornameparameter is null or empty.