© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•17mo ago•
43 replies
Beluga XD

Need help with AspNetCore and GUID.

Well I have got the following code for my register method in my webapi (Shown on first image. It is pretty simple). I am running my xUnit test for this method (everything is good) but it seems that I can't access my user.Id normally (I am returning it via "return Ok(user.Id);" line). Somehow debugger shows me that I have got two Id properties, one is actual Id and another just filled with zeros (shown on second photo). I would be grateful if someone explains me what is the problem with them and how can I access actual Id
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ I need help with Aspnetcore Identity in clean architecture
C#CC# / help
5mo ago
AspNetCore.Identity with EventSourcing
C#CC# / help
3y ago
❔ Certifications for dotnet and aspnetcore
C#CC# / help
3y ago
❔ ✅ Need help with methods and parameters
C#CC# / help
3y ago