Preview Support for SAP HANA is Now Available in RepoDB
Published:
We are excited to announce the preview release of SAP HANA support for RepoDB — bringing our hybrid ORM’s fluent CRUD, raw-SQL, and Bulk Operations capabilities to SAP HANA for the first time, right out of the gate.

What’s in this preview?
The new RepoDb.SapHana package brings the full RepoDB experience to SAP HANA, built on top of Sap.Data.Hana.Net.v6.0:
- Full CRUD operations — Insert, Query, Update, Delete, and Merge
- Raw-SQL operations — ExecuteQuery, ExecuteNonQuery, ExecuteScalar, and ExecuteReader, for when you need full control over the statement being sent to the server
- Bulk operations, via
RepoDb.SapHana.BulkOperations— BulkInsert, BulkUpdate, BulkDelete, BulkDeleteByKey, and BulkMerge
It follows the same programming model you already use with our SQL Server, PostgreSQL, MySQL, SQLite, Oracle, DB2, MariaDB, Firebird, and Vertica extensions — the same fluent API, the same lightweight philosophy, now targeting SAP HANA.
Why SAP HANA?
SAP HANA is the in-memory, columnar database at the core of a large share of enterprise SAP landscapes — S/4HANA, BW/4HANA, and countless custom-built systems around them. Teams working alongside those systems have long had to reach for heavier tooling just to get a fast, ADO.NET-native data-access layer. This preview brings the same lightweight, hybrid CRUD-plus-raw-SQL experience RepoDB is known for to that world.
Getting started
Install the packages:
> Install-Package RepoDb.SapHana -Version 0.0.1-alpha
> Install-Package RepoDb.SapHana.BulkOperations -Version 0.0.1-alpha
Initialize it once at startup:
GlobalConfiguration
.Setup()
.UseSapHana();
Basic CRUD
using (var connection = new HanaConnection(connectionString))
{
// Insert
var person = new Person { Name = "John Doe", Age = 30, CreatedDateUtc = DateTime.UtcNow };
var id = connection.Insert(person);
// Query
var queriedPerson = connection.Query<Person>(e => e.Id == id).FirstOrDefault();
// Update
queriedPerson.Age = 31;
var updatedRows = connection.Update(queriedPerson);
// Delete
var deletedRows = connection.Delete<Person>(id);
// Merge (Id must already be known — Merge matches on the primary key)
var mergedPerson = new Person { Id = id, Name = "John Doe", Age = 32, CreatedDateUtc = DateTime.UtcNow };
var mergeResult = connection.Merge(mergedPerson);
}
Raw-SQL
using (var connection = new HanaConnection(connectionString))
{
var people = connection.ExecuteQuery<Person>("SELECT * FROM \"Person\" ORDER BY \"Id\" ASC");
var affectedRows = connection.ExecuteNonQuery("DELETE FROM \"Person\" WHERE \"Id\" = :Id",
new { Id = 10045 });
var maxId = connection.ExecuteScalar<long>("SELECT MAX(\"Id\") FROM \"Person\"");
}
Bulk Operations
using (var connection = new HanaConnection(connectionString))
{
// BulkInsert — writes straight into the target table
var people = GetPeopleToInsert();
var insertedRows = connection.BulkInsert(people);
// BulkMerge — a real, single-statement ANSI MERGE via a staging table
var peopleToMerge = GetPeopleToMerge();
var mergedRows = connection.BulkMerge(peopleToMerge, qualifiers: e => e.Id);
// BulkDeleteByKey — takes the target table name directly
var keysToDelete = new long[] { 10045, 10046, 10047 };
var deletedByKeyRows = connection.BulkDeleteByKey<long>("Person", keysToDelete);
}
A preview, not a final release
As a preview package at v0.0.1-alpha, RepoDb.SapHana (and its Bulk Operations counterpart) is still maturing — APIs and behavior, including the caveats described above, may change before a stable release ships. Importantly, this release has been implemented and reviewed but not yet exercised against a live SAP HANA instance — in particular, verify the identity read-back, the UPSERT ... WITH PRIMARY KEY semantics, and the bulk pseudo-table lifecycle end-to-end before relying on this package in production. We would love to hear your feedback as you try it out; it directly shapes what we prioritize on the way to general availability.
~ Conceptualized by me. Reviewed and checked by AI. Refined and gatekept by me. ~
Please support us
Give a ⭐ to our Github repository | Follow me at X / Twitter | Connect with us at our official Teams Channel
Apache License 2.0 — Copyright © 2026 by Michael Camara Pendon / Create a Request
