IdentityServer4.Contrib.NHibernate 1.1.0

There is a newer version of this package available.
See the version list below for details.
Install-Package IdentityServer4.Contrib.NHibernate -Version 1.1.0
dotnet add package IdentityServer4.Contrib.NHibernate --version 1.1.0
<PackageReference Include="IdentityServer4.Contrib.NHibernate" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IdentityServer4.Contrib.NHibernate --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: IdentityServer4.Contrib.NHibernate, 1.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install IdentityServer4.Contrib.NHibernate as a Cake Addin
#addin nuget:?package=IdentityServer4.Contrib.NHibernate&version=1.1.0

// Install IdentityServer4.Contrib.NHibernate as a Cake Tool
#tool nuget:?package=IdentityServer4.Contrib.NHibernate&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Configuration

To configure the provider, simply add it to the IdentityServer configuration in the Startup class' ConfigureServices() method.

services.AddIdentityServer()
    .AddDeveloperSigningCredential()
    .AddNHibernateStores(
        Databases.SqlServer2012()
            .UsingConnectionString(Configuration["ConnectionStrings:Default"])
            .EnableSqlStatementsLogging(),
        cfgStore =>
        {
            cfgStore.DefaultSchema = "dbo";
        },
        opStore =>
        {
            opStore.DefaultSchema = "dbo";
        }
    )

In this example, we are configuring the NHibernate provider in order to:

  1. Store the configuration data in a SQL Server 2012 (or later) database, whose connection string is the one called Default in the appsettings.json file
  2. Show all the generated SQL statements in the console (EnableSqlStatementsLogging()).
  3. Put all the configuration store objects and operational store objects in the dbo schema.

Supported Databases

Currently, the provider directly supports the following databases:

  • SQL Server 2008
  • SQL Server 2012 or later.
  • SQLite.
  • SQLite in-memory (not suitable for production).

It's obviously possible to use every database supported by NHibernate.

Database Schema Creation

In the package's Scripts folder you will find the schema creation scripts for every supported database. You can use these scripts to create the database objects in the database you're going to use. Before executing, remember to modify them accordingly to your database schema.

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.4 134 9/6/2021
3.0.3 283 6/13/2021
3.0.2 224 9/29/2020
3.0.1 206 9/3/2020
3.0.0 299 7/30/2020
2.1.4 62 9/6/2021
2.1.3 118 6/14/2021
2.1.2 223 9/29/2020
2.1.1 175 9/14/2020
2.1.0 225 5/17/2020
2.0.4 64 9/6/2021
2.0.3 140 6/14/2021
2.0.2 215 9/29/2020
2.0.1 196 9/14/2020
2.0.0 256 11/30/2019
1.1.8 67 9/6/2021
1.1.7 104 6/14/2021
1.1.6 220 9/29/2020
1.1.5 185 9/14/2020
1.1.4 384 6/6/2020
1.1.2 232 11/17/2019
1.1.1 251 9/22/2019
1.1.0 298 7/8/2019
1.1.0-beta.1 218 2/15/2019