它似乎
受保护覆盖 DbEntityValidationResult ValidateEntity
在最新版本(2.2.0 和 3.0)中,从包 (Microsoft.AspNetCore.Identity.EntityFrameworkCore) 中的 IdentityDbContext 类中删除
如何验证 Core 3.0 或 Core 2.2 中的数据库?
我知道那是很久以前的事了,但我希望它能帮助像我这样有这个话题的未来问题的人,
我正在检查如何从 Asp.net core 2.2 执行此操作,并在 GitHub 中发现了此问题。https://github.com/dotnet/efcore/issues/19107 https://github.com/dotnet/efcore/issues/19107
问题是,如果我们想要覆盖验证,我们应该使用每个管理器都有的特定验证器,roleValidator、userValidator 等。
在this https://stackoverflow.com/questions/41800273/duplicate-role-names-on-asp-net-identity-and-multi-tenancy问题你可以找到roleValidator的实现
我发现真正帮助我理解它是如何工作的最后一个参考是通过检查源代码,您可以在其中看到默认验证器的实现https://github.com/dotnet/aspnetcore/tree/master/src/Identity/Extensions.Core/src https://github.com/dotnet/aspnetcore/tree/master/src/Identity/Extensions.Core/src
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)