fullstackhero / dotnet-starter-kit

Production Grade Cloud-Ready .NET 8 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
https://fullstackhero.net/dotnet-webapi-boilerplate/
MIT License
5.3k stars 1.59k forks source link

[BUG] Not able to get token based on the latest source code (up to 17th Mar) #918

Closed lsyuan closed 8 months ago

lsyuan commented 8 months ago

I cloned the entire repo to my local, updated the connection string, then start debug, the API is successfully running up, but when I trying to get token via api/tokens, I got exception in GetTokenAsync() method. image

This is the stacktrace: at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable1.GetEnumerator() at Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.System.Collections.Generic.IEnumerable.GetEnumerator() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at FSH.WebApi.Infrastructure.Identity.TokenService.d__6.MoveNext() in E:\fsh\dotnet-webapi-starter-kit-master\src\Infrastructure\Identity\TokenService.cs:line 43

I tried to use postgres and mssql, both of them able to auto create the tables and also inject data when first time running up.

lsyuan commented 8 months ago

sorry this is not a bug. I forgot to set the tenant code in header.