AddKeyedOracleCollection<TKey, TRecord>(IServiceCollection, object?, string, string,OracleCollectionOptions?, ServiceLifetime)
This method registers a keyed OracleCollection<TKey, TRecord> as VectorStoreCollection, with the specified connection string and service lifetime.
Declaration
// C#
public static IServiceCollection AddKeyedOracleCollection<TKey, TRecord>(this IServiceCollection services, object? serviceKey, string name, string connectionString, OracleCollectionOptions? options = default, ServiceLifetime lifetime = ServiceLifetime.Singleton) where TKey : notnull where TRecord : class
Parameters
-
servicesThe
IServiceCollectionto register theVectorStoreon. -
serviceKeyThe key to associate with the vector collection.
-
nameThe name of the collection.
-
connectionStringThe connection string.
-
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.