C
C#15mo ago
Hampus

getting data from mongodb to c#

im trying to get data from mongodb to c#. this is the code that ive written. im quite new to this
33 Replies
phaseshift
phaseshift15mo ago
And what is the question? $details
MODiX
MODiX15mo ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Hampus
Hampus15mo ago
sorry i forgot to finish my text. so atm the browser isnt starting when im debugging in VS. i have no idea why, it worked 20min ago @phaseshift its the csproj file that i should debug right?
.driib
.driib15mo ago
For the "it worked 20 minutes ago", I would strongly recommend using Git: https://www.atlassian.com/git/tutorials
Atlassian
Git Tutorials and Training | Atlassian Git Tutorial
Learn the basics of Git through this comprehensive Git training. Branching, pull requests, merging and more are covered in the Atlassian Git tutorial.
Hampus
Hampus15mo ago
i am using that github or is it the same?
phaseshift
phaseshift15mo ago
I've no idea what problem or symptoms you're addressing, so 🤷‍♂️
Hampus
Hampus15mo ago
ill try to download it from github again
.driib
.driib15mo ago
Yes, Github uses Git. You should be able to: 1) Look at the diff of the changes made and think if they broke the flow. 2) You can save the changes and roll back to the previous commit to see if the code still works. No need to re-download things. Git allows you to "jump" across versions on your computer directly.
.driib
.driib15mo ago
https://git-fork.com/ could be convenient for you if you are new to git command line.
Fork - a fast and friendly git client for Mac and Windows
Fork - a fast and friendly git client for Mac and Windows
Fork - a fast and friendly git client for Mac and Windows
Hampus
Hampus15mo ago
i have a project that has to be finished on friday. could i ask one of you for help when I need it please? i got a project and its way to hard, ive learned a lot but im not finished yet. whats left is to get data from the db and make it pop up in a search box as you search ive heard about that but im a bit stressed about this project, really wanna show them that i can do good but they gave me a big university project and ive been working on this for a couple of weeks and the deadline is friday
phaseshift
phaseshift15mo ago
fork is not free not usually of interest to students. unless theres a student license?
Hampus
Hampus15mo ago
for me i think github does the job that i need pretty good ive been programming since september and i already got a university project
.driib
.driib15mo ago
Sorry, don't have time for one-on-one help session. But there are 7.5k people here, so if you keep asking questions, you should get the help you need. Lycka till!
Hampus
Hampus15mo ago
im on internship thats why ok thank you! you know swedish? lol i downloaded it from github and the browswer is now opening up
.driib
.driib15mo ago
Ja, men bara lite 🙂 Great to hear you managed to go back to working state!
Hampus
Hampus15mo ago
Hampus
Hampus15mo ago
i have these categories in my mongodb for all objects. i would like to have it so i can search for names, and then a person would come up if I search "Hampus" like my name is, then my surname/efternamn would come up, and also my utbildning/education and självbeskrivning/self description
Hampus
Hampus15mo ago
Hampus
Hampus15mo ago
like this
phaseshift
phaseshift15mo ago
Nobody going to write something for you from scratch - show your current code and explain the immediate difficulty
Hampus
Hampus15mo ago
It’s hard because I’m extreamly new to databases and apis. I’ve been doing this for 1,5 week only and i gotta be finished by friday So I’m a little stressed
Hampus
Hampus15mo ago
Hampus
Hampus15mo ago
This is my code
phaseshift
phaseshift15mo ago
do you know how regex works? Like why are you searching for "i" in all fields
Hampus
Hampus15mo ago
lol i asked chatgpt No I’m so new to this man I’m not feeling well about it
phaseshift
phaseshift15mo ago
Friday is ambitious You can probably get a bunch of help and get something working, but I doubt you will understand what's happening. It's meant to be your work, afterall
Hampus
Hampus15mo ago
I would really want to get it working and then learn it you know why? Because i wanna show that i do good
phaseshift
phaseshift15mo ago
aka plagiarism
Hampus
Hampus15mo ago
they gave me a project that was way too hard for me
Hampus
Hampus15mo ago
im stressed about this even at home so thats why i just wanna make it work and be able to relax @phaseshift
phaseshift
phaseshift15mo ago
I understand stress, but that's not an excuse for scholastic dishonesty. If you can lead with proper questions and show understanding that's fine.
Hampus
Hampus15mo ago
my question is why its not working and im asking if you maybe could point me in the right direction is that a valid question?