Skip to content

Latest commit

 

History

History

Escendit.Extensions.Hosting.Cassandra

Escendit.Extensions.Hosting.Cassandra is a NuGet package that provides the ability to register ICluster. This package is suitable for host builder type registrations. For .NET Workers & Orleans Silos.

Installation

To install Escendit.Extensions.Hosting.Cassandra, run the following command in the Package Manager Console:

Install-Package Escendit.Extensions.Hosting.Cassandra

Usage

Register Options

Default

Host
    .CreateDefaultBuilder()
    .AddCassandraClientOptionsAsDefault(...);

Named

Host
    .CreateDefaultBuilder()
    .AddCassandraClientOptions("name", ...);

Register Client

Default

Host
    .CreateDefaultBuilder()
    .AddCassandraClientAsDefault(...);

Default From Options

Host
    .CreateDefaultBuilder()
    .AddCassandraClientFromOptionsAsDefault("options name");

Named

Host
    .CreateDefaultBuilder()
    .AddCassandraClient("name", ...);

From Options

Host
    .CreateDefaultBuilder()
    .AddCassandraClientFromOptions("name", "options name");

Consume Client

You can consume service with IServiceProvider, required variant exists as-well.

Default

serviceProvider
    .GetCassandraClient();

Named

serviceProvider
    .GetCassandraClient("name");

Contributing

If you'd like to contribute to cassandra-dotnet-extensions, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.