NHibernate.AspNetCore.Identity icon indicating copy to clipboard operation
NHibernate.AspNetCore.Identity copied to clipboard

Make id property type configurable

Open erdtsieck opened this issue 4 years ago • 4 comments

At the moment types like NHibernate.AspNetCore.Identity.IdentityRole cannot have an id column other than string. It would be great if we could choose this type for ourselves.

erdtsieck avatar Mar 09 '20 12:03 erdtsieck

Thanks, I will see if this can be done with nhibernate when I have time.

beginor avatar Mar 09 '20 23:03 beginor

Any updates !!

MohamedElbasuony1 avatar Jun 01 '21 06:06 MohamedElbasuony1

To make id property type configurable, it looks needs a lots of overrides, and you must provide mapping for all the types like IdentityRole IdentityRoleClaim IdentityUser IdentityUserClaim IdentityUserLogin IdentityUserRole IdentityUserToken, do you realy want to do this?

Or any good ideas?

beginor avatar Jun 02 '21 02:06 beginor

@erdtsieck @beginor @MohamedElbasuony1 @knuxbbs @stringit-mcagno @mylemans i've created a ASP.NET Core identity provider for NHibernate with support for FluentNHibernate and custom id properties. It's simple and highly flexible.

Check it out: https://github.com/alexmurari/FluentNHibernate.AspNetCore.Identity NuGet package: https://www.nuget.org/packages/Fluent.NHibernate.AspNetCore.Identity

If it proves to be useful, I would like to transfer ownership to the NHibernate organization.

alexmurari avatar Jan 24 '22 02:01 alexmurari