SoftwareDriven.Persistence.Cassandra
3.0.8
dotnet add package SoftwareDriven.Persistence.Cassandra --version 3.0.8
NuGet\Install-Package SoftwareDriven.Persistence.Cassandra -Version 3.0.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SoftwareDriven.Persistence.Cassandra" Version="3.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SoftwareDriven.Persistence.Cassandra" Version="3.0.8" />
<PackageReference Include="SoftwareDriven.Persistence.Cassandra" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SoftwareDriven.Persistence.Cassandra --version 3.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SoftwareDriven.Persistence.Cassandra, 3.0.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SoftwareDriven.Persistence.Cassandra@3.0.8
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SoftwareDriven.Persistence.Cassandra&version=3.0.8
#tool nuget:?package=SoftwareDriven.Persistence.Cassandra&version=3.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SoftwareDriven.Persistence.Cassandra
Apache Cassandra provider for SoftwareDriven.Persistence. Includes a bundled DataStax C# Driver (v3.22.0) with modifications. Targets net8.0 and net10.0.
Installation
dotnet add package SoftwareDriven.Persistence.Cassandra
Setup
// Register services with column mappings
services.AddCassandra();
services.AddSingleton(new CassandraRepositoryMapping<MyModel>(map => map
.PartitionKey(x => x.Name)
.ClusteringKey(x => x.Id)));
services.AddSingleton<CassandraRepositoryProvider<MyModel>>();
// Connect
var manager = serviceProvider.GetRequiredService<CassandraManager>();
await manager.Connect("localhost", "user", "password", "my_keyspace", useLogging: false);
With custom replication
await manager.Connect("localhost", 9042, "user", "password", "my_keyspace",
useLogging: false,
replication: "{ 'class': 'NetworkTopologyStrategy', 'dc1': '3' }");
Multi-instance (keyed DI)
services.AddCassandra("InstanceA");
services.AddCassandra("InstanceB");
var managerA = serviceProvider.GetRequiredKeyedService<CassandraManager>("InstanceA");
Column Mapping
services.AddSingleton(new CassandraRepositoryMapping<MyModel>(map => map
.Column(x => x.Id, cm => cm.WithSecondaryIndex())
.Column(x => x.Status, cm => cm.WithDbType<string>())
.PartitionKey(x => x.Name)
.ClusteringKey(x => x.Id),
// Optional: custom delete function
async (table, entry) => (await table
.Where(x => x.Name == entry.Name && x.Id == entry.Id)
.Delete().ExecuteAsync()).IsFullyFetched));
Usage
var provider = serviceProvider.GetRequiredService<CassandraRepositoryProvider<MyModel>>();
await provider.CreateOrUpdate(new MyModel { Name = "Test" });
var results = await provider.FindByExpression(x => x.Name == "Test");
Features
SupportsTotalCount: false (Cassandra does not support efficient count)SupportsPagingState: true (cursor-based pagination via paging state)DefaultIdSource:GuidSource- State converters:
Base64StateConverter,Base64UrlStateConverter - Type converters:
GuidTypeConverter,EnumTypeConverter,CompositeTypeConverter
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- SoftwareDriven.Persistence (>= 3.0.5)
-
net8.0
- SoftwareDriven.Persistence (>= 3.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.8 | 85 | 4/2/2026 |
| 3.0.7 | 172 | 2/12/2026 |
| 3.0.6 | 100 | 2/12/2026 |
| 3.0.5 | 97 | 2/12/2026 |
| 3.0.4 | 97 | 2/12/2026 |
| 3.0.3 | 100 | 2/11/2026 |
| 3.0.0 | 126 | 2/1/2026 |
| 2.12.0 | 111 | 1/8/2026 |
| 2.11.3 | 303 | 4/24/2025 |
| 2.11.2 | 229 | 4/24/2025 |
| 2.11.1 | 376 | 1/23/2025 |
| 2.11.0 | 171 | 1/23/2025 |
| 2.10.0 | 169 | 1/15/2025 |
| 2.9.0 | 207 | 11/30/2024 |
| 2.8.1 | 549 | 7/7/2024 |
| 2.8.0 | 209 | 7/7/2024 |
| 2.7.0 | 383 | 11/27/2023 |
| 2.6.1 | 281 | 7/25/2023 |
| 2.5.0 | 383 | 3/26/2023 |