Skip to main content
net10.0net8.0net9.0

A hybrid .NET ORM library for SAP HANA (using Sap.Data.Hana).

Published
Sep 4, 2026
1mo ago
Total Downloads
578
578

Install

dotnet add package RepoDb.SapHana --version 0.0.1-alpha2
ProductVersions
.NET
net10.0net8.0net9.0

README

SapHanaBuild SapHanaHome SapHanaVersion

RepoDb.SapHana β€” RepoDB for SAP HANA

The SAP HANA provider for RepoDB β€” a fast, lightweight .NET ORM that lets you use raw SQL and fluent operations side by side on the same connection. Built on top of RepoDb and the Sap.Data.Hana.Net.v6.0 ADO.NET driver.

This provider has not been verified against a live SAP HANA instance. See the code comments in this project for the specific assumptions made (parameter prefix, driver type names, etc.) and verify them before relying on this in production.

Important Pages

  • GitHub Home β€” core library and source code.
  • Website β€” full documentation, API reference, and blog.

Community

Dependencies

License

Apache-2.0 β€” Copyright Β© 2020 Michael Camara Pendon


Installation

Install-Package RepoDb.SapHana

Or visit the installation page for more options.

Get Started

Initialize the bootstrapper once at application startup:

GlobalConfiguration
    .Setup()
    .UseSapHana();

Then use any RepoDB operation directly on your HanaConnection:

Query

using (var connection = new HanaConnection(ConnectionString))
{
	var customer = connection.Query<Customer>(c => c.Id == 10045);
}

Insert

var customer = new Customer
{
	FirstName = "John",
	LastName = "Doe",
	IsActive = true
};
using (var connection = new HanaConnection(ConnectionString))
{
	var id = connection.Insert<Customer>(customer);
}

Update

using (var connection = new HanaConnection(ConnectionString))
{
	var customer = connection.Query<Customer>(10045);
	customer.FirstName = "John";
	customer.LastUpdatedUtc = DateTime.UtcNow;
	var affectedRows = connection.Update<Customer>(customer);
}

Delete

using (var connection = new HanaConnection(ConnectionString))
{
	var customer = connection.Query<Customer>(10045);
	var deletedCount = connection.Delete<Customer>(customer);
}

ExecuteQuery

using (var connection = new HanaConnection(ConnectionString))
{
	var customer = connection.ExecuteQuery<Customer>("SELECT * FROM \"Customer\" WHERE (Id = :Id);", new { Id = 10045 }).FirstOrDefault();
}

ExecuteNonQuery

using (var connection = new HanaConnection(ConnectionString))
{
	var affectedRows = connection.ExecuteNonQuery("UPDATE \"Customer\" SET FirstName = :FirstName WHERE (Id = :Id);", new { FirstName = "John", Id = 10045 });
}

ExecuteScalar

using (var connection = new HanaConnection(ConnectionString))
{
	var count = connection.ExecuteScalar<int>("SELECT COUNT(*) FROM \"Customer\";");
}

Visit the get-started page for the full SAP HANA guide.

License

Apache-2.0 β€” Copyright Β© 2019 Michael Camara Pendon

Changes from Previous Version

No structural changes between v0.0.1-alpha1 and v0.0.1-alpha2.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.