Nuget packages:
ASPNET Core Identity provider that uses NHibernate for storage
public class Startup {
public void ConfigureServices(
IServiceCollection services
) {
// Remove EFCore stores.
// services.AddDbContext<ApplicationDbContext>(
// options =>
// options.UseSqlite(Configuration.GetConnectionString("DefaultConnection")));
// services.AddDefaultIdentity<IdentityUser>()
// .AddEntityFrameworkStores<ApplicationDbContext>();
// Add Hibernate stores
var path = System.IO.Path.Combine(
AppDomain.CurrentDomain.BaseDirectory,
"hibernate.config"
);
services.AddHibernate(path);
services.AddDefaultIdentity<NHibernate.AspNetCore.Identity.IdentityUser>()
.AddRoles<NHibernate.AspNetCore.Identity.IdentityRole>()
.AddHibernateStores();
}
}
For more detailed samples, please look at the WebTest project.