❔ Services Not Working with DB Model
I have a db model
and some services that use it
however the service throws an error when using the model and I'm not sure why or what it means
using Libraries.Shared.Models.DbModels.Authentication;
using Microsoft.AspNetCore.Identity;
namespace StoriedKingdom.Dungeon.Models.DbModels;
internal sealed class DiscordUser : AppUser<ulong>
{
internal DiscordUser(string userName, Guid auid) : base(userName, auid)
{
}
internal string Discriminator { get; set; } = string.Empty;
[ProtectedPersonalData] internal string Discord { get; set; } = string.Empty;
[ProtectedPersonalData] internal string NormalizedDiscord { get; set; } = string.Empty;
internal string? Avatar { get; set; }
internal bool? Verified { get; set; }
}using Libraries.Shared.Models.DbModels.Authentication;
using Microsoft.AspNetCore.Identity;
namespace StoriedKingdom.Dungeon.Models.DbModels;
internal sealed class DiscordUser : AppUser<ulong>
{
internal DiscordUser(string userName, Guid auid) : base(userName, auid)
{
}
internal string Discriminator { get; set; } = string.Empty;
[ProtectedPersonalData] internal string Discord { get; set; } = string.Empty;
[ProtectedPersonalData] internal string NormalizedDiscord { get; set; } = string.Empty;
internal string? Avatar { get; set; }
internal bool? Verified { get; set; }
}and some services that use it
addServices<TAppUser>(){
services.TryAddScoped<ISecurityStampValidator, SecurityStampValidator<TAppUser>>();
services.TryAddScoped<ITwoFactorSecurityStampValidator, TwoFactorSecurityStampValidator<TAppUser>>();
}addServices<TAppUser>(){
services.TryAddScoped<ISecurityStampValidator, SecurityStampValidator<TAppUser>>();
services.TryAddScoped<ITwoFactorSecurityStampValidator, TwoFactorSecurityStampValidator<TAppUser>>();
}however the service throws an error when using the model and I'm not sure why or what it means
Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Identity.ISecurityStampValidator Lifetime: Scoped ImplementationType: Microsoft.AspNetCore.Identity.SecurityStampValidator`1[StoriedKingdom.Dungeon.Models.DbModels.DiscordUser]'Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Identity.ISecurityStampValidator Lifetime: Scoped ImplementationType: Microsoft.AspNetCore.Identity.SecurityStampValidator`1[StoriedKingdom.Dungeon.Models.DbModels.DiscordUser]'