我试图理解为什么新的ASP.NET身份表停止使用Guid(uniqueidentifier类型)作为键 - 相反它现在正在使用nvarchar(128)但仍保持Guid一个string...
这不是一个巨大的浪费吗?(uniqueidentifier只有2 integers对整体Guid作为36个字符string)
我怀疑实体框架可能对此负责......
更改为uniqueidentifier键是否安全?
谁能告诉我使用36个字符串有什么好处?
asp.net entity-framework entity-framework-6 asp.net-identity
我正在使用ASP.Net Identity 2,但很快就希望在它变得更稳定时更改为Identity 3(任何人都知道这可能是什么时候?).这是我的代码示例:
content.ModifiedBy = User.Identity.GetUserId();
Run Code Online (Sandbox Code Playgroud)
Content表将ModifedBy存储为UNIQUEIDENTIFIER,Content对象将Guid的数据类型分配给ModifiedBy
当我查看GetUserId()的签名时,它返回一个字符串.
那么如何将用户UserId带入ModifiedBy,这是一个Guid?
asp.net asp.net-identity asp.net-identity-2 asp.net-identity-3
我正在尝试将ASPNET Core 2.0中的主键更改为Guid或long.
但是,在Startup类中,我收到以下错误
Error CS1061 'IdentityBuilder' does not contain a definition for
'AddEntityFrameworkStores' and no extension method 'AddEntityFrameworkStores' accepting
a first argument of type 'IdentityBuilder' could be found (are you missing a using
directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)
我认为原因是这些例子都是基于旧的ASPNET Core 1.0.如何在ASPNET Core 2.0中更改Identity的主键?
database sql-server sqldatatypes asp.net-identity asp.net-core