Morridis
Morridis
Explore posts from servers
CC#
Created by Morridis on 11/18/2024 in #help
✅ Does .NET 8 compiled by .NET 9 sdk as production ready as .NET 8 compiled by .NET 8 sdk?
.net 9 sdk can target .net 8 Where do I get more info on this topic?
5 replies
CC#
Created by Morridis on 10/11/2024 in #help
✅ I'm looking for performance and load testing data on ConfigureAwait(false)
I cannot find any proper performance and load testing data on ConfigureAwait(false) for .NET 8 API's and azure functions. I want this info in order to make educated decision on using it.
44 replies
CC#
Created by Morridis on 9/24/2024 in #help
✅ [closed] Where do people get .NET 9 RC 2?
It mentioned as requirement in some Aspire repos. But best I can find is .NET 9 RC 1.
24 replies
CC#
Created by Morridis on 3/30/2023 in #help
❔ How to automatically set version of project to know what version deployed on specific server?
The problem is that there is bunch of clients with different versions of .net core and netfx project. I'm looking for maximally automated way to let us and clients know what version they have.
5 replies
CC#
Created by Morridis on 2/27/2023 in #help
❔ [EF Core] e => locationsIds.Any(id => e.Location.ParentsIds.Contains(id)); could not be translated
Expression type Expression<Func<Sensor, bool>> where Sensor has field Location. Location has string field ParentsIds, containing bunch of Location ID's. Code:
C++
var locationsIds = locations.Select(e => e.Id.ToString()).ToList();
return e => locationsIds.Any(id => e.Location.ParentsIds.Contains(id));
C++
var locationsIds = locations.Select(e => e.Id.ToString()).ToList();
return e => locationsIds.Any(id => e.Location.ParentsIds.Contains(id));
Exception:
C++
The LINQ expression 'id => EntityShaperExpression:
Domain.Location
ValueBufferExpression:
ProjectionBindingExpression: Inner
IsNullable: False
.ParentsIds.Contains(id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
C++
The LINQ expression 'id => EntityShaperExpression:
Domain.Location
ValueBufferExpression:
ProjectionBindingExpression: Inner
IsNullable: False
.ParentsIds.Contains(id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
upd. Found mention of mine issue. https://stackoverflow.com/a/27295828 No solution
2 replies
CC#
Created by Morridis on 9/22/2022 in #help
API Design of login and refresh JWT token endpoint questions
I'm designing Login and refresh token and I have several questions. This is what I return on any refresh token and login.
{
"userName": "Barocco",
"accessToken": {
"tokenString": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiNTAyZTYzZC1lYTYwLTQ4MTktYTc0Ny00ZGI4YmNiY2U3YzkiLCJlbWFpbCI6ImxsQHd3IiwidW5pcXVlX25hbWUiOiJCYXJvY2NvIiwicm9sZSI6IkFkbWluIiwibmJmIjoxNjYzOTIzOTAxLCJleHAiOjE2NjM5MjM5MDYsImlhdCI6MTY2MzkyMzkwMSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMS8iLCJhdWQiOiJodHRwczovL2xvY2FsaG9zdDo1MDAxLyJ9.I64OFaR9xnP2VmROBnv2RBNmGdAmbBVUn9kvocUN0Sc",
"expireAt": "2022-09-29T14:16:35.0050936Z"
},
"refreshToken": {
"tokenString": "JaXYg8r6NCJPD4g3JoQuyKIK4mWV/Be+J+B+QPshPfk=",
"expireAt": "2022-10-22T14:16:35.0050936Z"
},
"role": "Admin"
}
{
"userName": "Barocco",
"accessToken": {
"tokenString": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiNTAyZTYzZC1lYTYwLTQ4MTktYTc0Ny00ZGI4YmNiY2U3YzkiLCJlbWFpbCI6ImxsQHd3IiwidW5pcXVlX25hbWUiOiJCYXJvY2NvIiwicm9sZSI6IkFkbWluIiwibmJmIjoxNjYzOTIzOTAxLCJleHAiOjE2NjM5MjM5MDYsImlhdCI6MTY2MzkyMzkwMSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMS8iLCJhdWQiOiJodHRwczovL2xvY2FsaG9zdDo1MDAxLyJ9.I64OFaR9xnP2VmROBnv2RBNmGdAmbBVUn9kvocUN0Sc",
"expireAt": "2022-09-29T14:16:35.0050936Z"
},
"refreshToken": {
"tokenString": "JaXYg8r6NCJPD4g3JoQuyKIK4mWV/Be+J+B+QPshPfk=",
"expireAt": "2022-10-22T14:16:35.0050936Z"
},
"role": "Admin"
}
Is it a good format to return this data? Is there any standard? Is there a good values for token and refresh token lifetime? Should I allow refreshing token if access token inspired but refresh token - not?
1 replies
CC#
Created by Morridis on 9/21/2022 in #help
How to exclude ef core migrations from coverage statistics? [solved]
I run
dotnet test .\BookStore.sln /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
reportgenerator -reports:"tests\BookStore.IntegrationTests\coverage.cobertura.xml;tests\BookStore.Tests\coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html
dotnet test .\BookStore.sln /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
reportgenerator -reports:"tests\BookStore.IntegrationTests\coverage.cobertura.xml;tests\BookStore.Tests\coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html
And migrations folders affects my coverage statistics. From what I understand better to hide them. But
dotnet test .\BookStore.sln /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:ExcludeByFile=\"../BookStore.DataAccess/Migrations/*.cs"
dotnet test .\BookStore.sln /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:ExcludeByFile=\"../BookStore.DataAccess/Migrations/*.cs"
not works.
2 replies