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
services
The
IServiceCollection
to register theVectorStore
on.name
The name of the collection.
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
name
parameter is null or empty.
InvalidOperationException
: The service collection does not contain an OracleDataSource
.