![]() |
VOOZH | about |
dotnet add package Nethereum.BlockchainStore.Sqlite --version 6.1.0
NuGet\Install-Package Nethereum.BlockchainStore.Sqlite -Version 6.1.0
<PackageReference Include="Nethereum.BlockchainStore.Sqlite" Version="6.1.0" />
<PackageVersion Include="Nethereum.BlockchainStore.Sqlite" Version="6.1.0" />Directory.Packages.props
<PackageReference Include="Nethereum.BlockchainStore.Sqlite" />Project file
paket add Nethereum.BlockchainStore.Sqlite --version 6.1.0
#r "nuget: Nethereum.BlockchainStore.Sqlite, 6.1.0"
#:package Nethereum.BlockchainStore.Sqlite@6.1.0
#addin nuget:?package=Nethereum.BlockchainStore.Sqlite&version=6.1.0Install as a Cake Addin
#tool nuget:?package=Nethereum.BlockchainStore.Sqlite&version=6.1.0Install as a Cake Tool
SQLite implementation of the Nethereum blockchain storage layer using Entity Framework Core.
Nethereum.BlockchainStore.Sqlite provides the SQLite-specific DbContext, context factory, and DI registration for storing indexed Ethereum blockchain data. It inherits from Nethereum.BlockchainStore.EFCore.BlockchainDbContextBase and uses Microsoft.EntityFrameworkCore.Sqlite.
SQLite is ideal for local development, testing, single-node DevChain scenarios, and embedded applications where a full database server is not needed.
SqliteBlockchainDbContext configured with UseSqlite()SqliteBlockchainDbContextFactory implementing IBlockchainDbContextFactory with automatic EnsureCreated() on first useAddSqliteBlockchainStorage() DI extension that registers the factory and all EFCore repositoriesdotnet ef migrations toolingdotnet add package Nethereum.BlockchainStore.Sqlite
Targets net8.0 and net10.0.
BlockchainDbContextBase, entity builders, and repository implementationsConfigurationUtils.Build() for appsettings-based connection string resolutionusing Nethereum.BlockchainStore.Sqlite;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSqliteBlockchainStorage("Data Source=blockchain.db");
This registers IBlockchainDbContextFactory and all repository implementations via AddBlockchainRepositories().
var factory = new SqliteBlockchainDbContextFactory("Data Source=blockchain.db");
using var context = factory.CreateContext();
var latestBlock = await context.Blocks
.Where(b => b.IsCanonical)
.OrderByDescending(b => b.BlockNumber)
.FirstOrDefaultAsync();
var factory = new SqliteBlockchainDbContextFactory("Data Source=blockchain.db");
var repoFactory = new BlockchainStoreRepositoryFactory(factory);
var steps = new BlockStorageProcessingSteps(repoFactory);
var orchestrator = new BlockCrawlOrchestrator(web3.Eth, steps);
var processor = new BlockchainProcessor(
orchestrator,
repoFactory.CreateBlockProgressRepository(),
lastConfirmedBlockService);
await processor.ExecuteAsync(cancellationToken);
SqliteBlockchainDbContext resolves the connection string in this order:
ConnectionStrings:SqliteConnection from appsettings.jsonConnectionStrings:BlockchainDbStorage from appsettings.jsonAll tables use the same schema as Nethereum.BlockchainStore.EFCore with TEXT column type for unlimited text fields. Numeric indexing fields (BlockNumber, Timestamp, TransactionIndex, LogIndex, Nonce, TransactionType) are stored as INTEGER (SQLite's native 64-bit integer type).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Nethereum.BlockchainStore.Sqlite:
| Package | Downloads |
|---|---|
|
Nethereum.BlockchainStorage.Processors.Sqlite
SQLite-specific DI registration for the Nethereum blockchain indexer hosted services. |
This package is not used by any popular GitHub repositories.