├── test ├── WebTest │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ ├── Error.cshtml │ │ │ ├── _LoginPartial.cshtml │ │ │ ├── _Layout.cshtml.css │ │ │ └── _Layout.cshtml │ ├── Areas │ │ └── Identity │ │ │ └── Pages │ │ │ └── _ViewStart.cshtml │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ ├── css │ │ │ └── site.css │ │ └── lib │ │ │ ├── jquery │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ └── LICENSE.md │ │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ └── css │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.rtl.min.css │ │ │ │ ├── bootstrap-reboot.rtl.css │ │ │ │ └── bootstrap-reboot.css │ │ │ └── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ └── jquery.validate.unobtrusive.min.js │ ├── appsettings.Development.json │ ├── Models │ │ ├── ErrorViewModel.cs │ │ ├── PagedResultModel.cs │ │ └── ToDoItemModel.cs │ ├── appsettings.json │ ├── Properties │ │ └── launchSettings.json │ ├── Repositories │ │ ├── ITodoItemRepository.cs │ │ └── TodoItemRepository.cs │ ├── Entities │ │ ├── AppRole.cs │ │ ├── City.cs │ │ ├── AppRole.hbm.xml │ │ ├── City.hbm.xml │ │ ├── AppRoleMapping.cs │ │ ├── TodoItem.hbm.xml │ │ ├── TodoItem.cs │ │ ├── AppUser.cs │ │ ├── AppUser.hbm.xml │ │ ├── CityMapping.cs │ │ ├── TodoItemMapping.cs │ │ └── AppUserMapping.cs │ ├── Program.cs │ ├── MappingProfile.cs │ ├── hibernate.config │ ├── Controllers │ │ ├── HomeController.cs │ │ ├── RolesController.cs │ │ ├── UsersController.cs │ │ └── TodoController.cs │ ├── WebTest.csproj │ └── Startup.cs └── UnitTest │ ├── LoggingBuilderTest.cs │ ├── LoggingBuilder.cs │ ├── hibernate.config │ ├── UnitTest.csproj │ ├── BaseTest.cs │ ├── IdentityTest.cs │ └── Identity │ ├── RoleStoreTest.cs │ ├── ConfigTest.cs │ └── UserStoreTest.cs ├── .gitignore ├── database ├── db_schema.png ├── sqlite │ ├── 102_cities.sql │ ├── 02_app_roles.sql │ ├── 101_todo_items.sql │ ├── 01_app_users.sql │ └── 00_aspnet_core_identity.sql ├── mssql │ ├── 02_app_roles.sql │ ├── 01_app_users.sql │ ├── 101_todo_items.sql │ └── 00_aspnet_core_identity.sql ├── mysql │ ├── 02_app_roles.sql │ ├── 01_app_users.sql │ ├── 101_todo_items.sql │ └── 00_aspnet_core_identity.sql ├── postgres │ ├── 01_app_users.sql │ ├── 02_app_roles.sql │ ├── 101_todo_items.sql │ ├── 102_cities.sql │ └── 00_aspnet_core_identity.sql └── up.md ├── src └── NHibernate.AspNetCore.Identity │ ├── Entities │ ├── IdentityRole.cs │ ├── IdentityRoleClaim.cs │ ├── IdentityUserClaim.cs │ ├── IdentityUser.cs │ ├── IdentityUserRole.cs │ ├── IdentityUserLogin.cs │ └── IdentityUserToken.cs │ ├── IdentityResultExtensions.cs │ ├── NHibernate.AspNetCore.Identity.csproj │ ├── IdentityBuilderExtensions.cs │ ├── ConfigurationExtensions.cs │ ├── ConfigurationHelper.cs │ ├── Mappings │ ├── IdentityUserRole.cs │ ├── IdentityUserToken.cs │ ├── IdentityUserClaim.cs │ ├── IdentityRoleClaim.cs │ ├── IdentityUserLogin.cs │ └── IdentityRole.cs │ ├── RoleStore.cs │ └── UserOnlyStore.cs ├── push-package.sh ├── .vscode ├── tasks.json └── launch.json ├── NHibernate.AspNetCore.Identity.slnx ├── Directory.Packages.props ├── CHANGELOG.md ├── README.md └── .editorconfig /test/WebTest/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vs 3 | .vscode 4 | obj 5 | bin 6 | *.user 7 | *.db3 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /test/WebTest/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /database/db_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/NHibernate.AspNetCore.Identity/HEAD/database/db_schema.png -------------------------------------------------------------------------------- /test/WebTest/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebTest 2 | @using WebTest.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /test/WebTest/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/NHibernate.AspNetCore.Identity/HEAD/test/WebTest/wwwroot/favicon.ico -------------------------------------------------------------------------------- /test/WebTest/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |
Use this page to detail your site's privacy policy.
7 | -------------------------------------------------------------------------------- /database/sqlite/102_cities.sql: -------------------------------------------------------------------------------- 1 | drop table if exists cities; 2 | 3 | create table cities ( 4 | id bigint not null, 5 | name text not null unique, 6 | population int, 7 | primary key (id) 8 | ); 9 | -------------------------------------------------------------------------------- /src/NHibernate.AspNetCore.Identity/Entities/IdentityRole.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | 3 | namespace NHibernate.AspNetCore.Identity; 4 | 5 | public class IdentityRole : IdentityRoleLearn about building Web apps with ASP.NET Core.
8 |
12 | Request ID: @Model.RequestId
13 |
18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |
20 |21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |
26 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to find out which attributes exist for C# debugging 3 | // Use hover for the description of the existing attributes 4 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "WebTest", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "preLaunchTask": "build", 12 | // If you have changed target frameworks, make sure to update the program path. 13 | "program": "${workspaceFolder}/test/WebTest/bin/Debug/net7.0/WebTest.dll", 14 | "args": [], 15 | "cwd": "${workspaceFolder}/test/WebTest", 16 | // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window 17 | "console": "internalConsole", 18 | "stopAtEntry": false, 19 | "internalConsoleOptions": "openOnSessionStart" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/NHibernate.AspNetCore.Identity/Entities/IdentityUserRole.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | 3 | namespace NHibernate.AspNetCore.Identity; 4 | 5 | public class IdentityUserRole : IdentityUserRole