morry329#
Save button does not save the inserted data
I just got rid of all the IEnumerable implementation, then the exception is gone.
ChatGPT recommended me to make the ListingProjects enumerable (as I wanted to make a collection of vacation listing names)
But now for the sake of simplicity I will learn more about IEnumerable, this one caused me some unwanted exception
15 replies
Save button does not save the inserted data
ups, I did not want to return all the records from the table .. see, I did not understand what my code is doing.
so with this line return await _context.ListingDBTable.ToListAsync();
it will return all records from the table, correct? And it eventually triggers the exception as it causes the circulation or
15 replies
Save button does not save the inserted data
Network tab just got me this https://pastebin.com/stiTYN5g
This exception seems to point to
`
This method is in the API controller class separately created from HomeController (where this save method lies) : you can find the full code for the API controller https://pastebin.com/f73x8fDN
I tried something like this on Program.cs
`
But the exception is not gone
I suppose this exception prevents my code from what it should be doing
15 replies
Does this make sense? |
Ok so it does not make sense then. I do not ask for the solution code or anything but I would like some advice on how to approach it: I googled how to delete the card view with the button Onclick: I only found the frontend ways like manipulating jquery to make the div items disappear (that div has no text data retrieved/loaded from SQL). If the div card item displays data loaded from SQL, does it still make sense to remove it via jquery etc? Or would you do that very differently?
5 replies
created a new view but that view only outputs the html (of the login page!)
well this innovative idea came from AI, ofc not from me. No idea what kind of company needs an app like this, returning HTML instead of JSON :kekw:
I ended up adding this line
return Redirect(requestUrl)
I hope this is what you meant23 replies
created a new view but that view only outputs the html (of the login page!)
Ahh ok
ContentType = "application/json",
So my uneducated guess is: if I keep application/json like this the app will display the bunch of HTML on the browser, right?
I assume changing this would do the trick
23 replies
MySqlException: Table 'searchhome.aspnetusers' doesn't exist
Thank you so much for the guideline -- just a quick question. Since I am on Rider, it doesn't seem to have the Package Manager Console (it's only for Visual Studio, right?)
In that case I can use "dotnet ef database update " after I added the initial migration, right?
16 replies
Dealing with the professor: advice appreciated
Sure I will but I found out that yelling/screaming sometimes helps me get out of the stressful situation like this oral exam. Because of our shared "great" histories respect is lost between this prof and myself. I have already done something against him which I am sure compromised his academic career. So I somehow understand why he behaves like this with me. I never got good grades from him since then (so his classes are my GPA killers). But I am fine with this
13 replies
Dealing with the professor: advice appreciated
It could be. If they want to suspend me for misconduct they have to produce some written evidence plus witnesses' notes - collecting supporting documents take them time. I doubt they would dare to do so
13 replies
Dealing with the professor: advice appreciated
I will tell all this once again to the profs next week (see if my talking to myself wins or if his interruption/repeated questions win). But it has been stressful to see him on the exam. I feel like I'd have two different court procedure which sack up my mental energy
13 replies
Dealing with the professor: advice appreciated
Yeah I know it's not really C# related but I just wanted to vent out my stress on the Internet
Sure I will see if my grades will be impacted by it but my observation is that he intentionally avoids understanding me or repeating the questions/pretending that he would not understand me
I am pretty sure he behaves like this with other students as well. So much so we take his name as an example of "the lead patient" just to dishonour him this way. One such student told me his presence scares her whenever she is in class etc
I am also pretty sure he tries to fail me in any way he could (yes we have some "great" shared histories in the last few semester)
13 replies