System.TypeInitializationException: The type initializer for 'Microsoft.EntityFrameworkCore.Query.QueryableMethods' threw an exception.
---> System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
at Microsoft.EntityFrameworkCore.Query.QueryableMethods..cctor()
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Query.QueryableMethods.get_FirstOrDefaultWithPredicate()
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.FirstOrDefaultAsync[TSource](IQueryable`1 source, Expression`1 predicate, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore`9.FindByNameAsync(String normalizedUserName, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Identity.UserManager`1.FindByNameAsync(String userName)
at Microsoft.AspNetCore.Identity.SignInManager`1.PasswordSignInAsync(String userName, String password, Boolean isPersistent, Boolean lockoutOnFailure)
at Alura.WebAPI.WebApp.Api.LoginController.Token(LoginModel model) in C:\Users\bruno\Documents\Visual Studio 2022\Projects\Alura.WebAPI\Alura.WebApi.AuthProvider\LoginController.cs:line 28
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
HEADERS
=======
Accept: */*
Connection: keep-alive
Host: localhost:5000
User-Agent: PostmanRuntime/7.29.0
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Cookie: .AspNetCore.Identity.Application=CfDJ8BsQFl2DFIJNiWOZEDKHAOnAIlNxhlbiIsXE5dAObRIfzs6rql1aB7e7poH7cdSZR_Bfjk8mmfJz8PrqKAPtEf7XkgRR9PPEOTaIUGj91pR_09C25lw1_kIFbC6GH4zpB0RZnSKLcvSYhhYkUOtX5evFC-1UTsdSmqOY_DHjD-vZ57sVDmVtZ_VY4MgUfRza3FFuXyYHWoQKghqzB-3Vmh4R1p159_mrF08q6BcStLtfF0adKP1rzoxmHEr80vQsib1GBFq6LrDwv28kxUPoGok-ieq44HW3EP3spCAIuwwnQjzW5DHHkf_MuyoVlwtIRJDQv_7ql1MQTFm4vZ6zLxUfbLCAMYj_D2iE6YV8SwGwdcUdWUxkYtZ0KICbGQRLhhLUqIxGV3FUqqMkvotcSxO73Uf5RR7mB_1BTQLj9gva2EKBRe6SfqnstEhdJUJkAJ2DcpNdWtYH-A_uDZ3dLGunvSCcAe5ce-ky4wGwfX2DTwlulEmi-w3MPdHyD0NMcEVGa0yJwMTZErNOPMqDjF0_9FAoCaIPEBKmG-noJnMbs6xxFHgeqES2yw4BY8cGs_vj4IaDtK3fzhYJRDlAqEg
Content-Length: 51
Postman-Token: 0e70ae00-5f0e-48a1-814e-d0e609a2313e
Não consigo me logar e obter o token, o que fazer ?