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 : class
Parameters
TKey
The key type of
OracleCollection<TKey, TRecord>
.TRecord
The record type of
OracleCollection<TKey, TRecord>
.services
The
IServiceCollection
to register theVectorStore
on.serviceKey
The key to associate with the vector collection.
name
The name of the collection.
connectionStringProvider
The connection string provider.
optionsProvider
The optional options provider 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
connectionStringProvider
orservices
parameter is null. - The provided
name
parameter is null or empty.