30 Replies
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code! (see $code for more information on how to paste your code)
So basically its a Flight Booking System and I'm trying to book a flight here with number of Seats to reserve but its always ending up me in the error
can you show the model, and your endpoint that receives the POST?
Hm
Oh no, your viewmodel is a database entity?!
This is a huge no-no
Its probably not the reason for your current issues, but I'd still recommend not doing that
oh okay. I'm just super new to this
You have a ton of error handling already, what happens if you have the debugger on when you press submit?
That's all ChatGPT oops
:/
:andyCry:
Any idea how can I make it work?
My question remains, have you tried debugging?
I'm not sure how to do that
:OhNo:
Time to learn
$debug
Tutorial: Debug C# code and inspect data - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
I just tried to but its so confusinggg
Got a headset? Could jump to a VC channel and screenshare
Sure that be so great
#vc-1
@Pobiega Thanks for the help! Great to know about the debug part I simplify it by using a simple int its working now. I can later on get more details from the user session that would be fine !
Great!
Hey there!
Can anyone tell me how can I save that session information because when I tried it saves the String Part Username but the Id changes itself
Anyways I found it
My string was having different name :sadge: