Skip to content

Latest commit

 

History

History

Escendit.AspNetCore.Builder.Cassandra

Escendit.AspNetCore.Builder.Cassandra is a NuGet package that provides the ability to register ICluster. This package is suitable for web application builder type registrations. For ASP.NET Core Web Applications.

Installation

To install Escendit.AspNetCore.Builder.Cassandra, run the following command in the Package Manager Console:

Install-Package Escendit.AspNetCore.Builder.Cassandra

Usage

Register Options

Default

WebApplication
    .CreateBuilder()
    .AddCassandraClientOptionsAsDefault(...);

Named

WebApplication
    .CreateBuilder()
    .AddCassandraClientOptions("name", ...);

Register Client

Default

WebApplication
    .CreateBuilder()
    .AddCassandraClientAsDefault(...);

Default From Options

WebApplication
    .CreateBuilder()
    .AddCassandraClientFromOptionsAsDefault("options name");

Named

WebApplication
    .CreateBuilder()
    .AddCassandraClient("name", ...);

From Options

WebApplication
    .CreateBuilder()
    .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.