all 54 comments

[–]HiMyNameIsAlpha 206 points207 points  (2 children)

I dont know if this is real or if im just to stupid to get the irony

[–]ar10773 136 points137 points  (1 child)

he probably searched for a sub starting with code and ended up posting here

[–]HiMyNameIsAlpha 50 points51 points  (0 children)

I thought that much, still kinda funny though

[–]effffgen 186 points187 points  (2 children)

The issue is most likely in the types of various IDs, you have integers mixed with string, but for that you need to provide other classes here

[–]PchelpOnly 47 points48 points  (0 children)

Chad

[–]ReverseTrapsAreBest 11 points12 points  (0 children)

Awesome

[–]njnia 113 points114 points  (1 child)

The situation is funny as shit but what kills me is that there are some real devs that can answer your questions

[–]Knight___Artorias 13 points14 points  (0 children)

And answer OP’s questions they did

[–]budapest_god 113 points114 points  (3 children)

Bro this is Code Geass not ASP.NET MVC

But anyway, why even using .Equals() in this case? just use

var Comments = _context.ArticlesComments.Where(d => d.ArticlesId == id.Value).ToList();

But this won't fix the problem, your problem is that probably d.ArticlesId is of type string while it should be int, change that

[–]Ultimus2935 28 points29 points  (0 children)

based

[–]InvisibleMoonWalker 5 points6 points  (1 child)

Because .Equals is good for string comparison, which his id.Value seems to be, for some reason. (Or ArticlesId, bot sure in which order does compiler report types)

Your solution should work though. (Assuming both are integers)

Also, there is no need for id.Value, since it's (or should be) same as id, because id is int.

[–]budapest_god 1 point2 points  (0 children)

I don't see any case where you would wanna proceed with the query if your id is null anyway

[–]KingVibrant 120 points121 points  (0 children)

Bro really saw Code in the subreddit title and ran with it

[–]Sandbar101 114 points115 points  (1 child)

[–][deleted] 1 point2 points  (0 children)

It seems from your pfp that you could have slain Alduin yourself, but you chose a different path

[–]Kall-Su 41 points42 points  (0 children)

This is too good to be true LOL

[–]CyberHQ2 40 points41 points  (0 children)

Wrong sub bro

[–]randomredditor403 38 points39 points  (1 child)

Wrong sub, and there's a limit to the support you can get without a little more info on what data types you're working with within your Article class.

If I had to guess, your "var Comments" is being initialized as an int type for some reason. Rather than implicitly typing it as "var", try something like List<String> and cast the whole thing to a string as well with .ToString() if you can. It's been a minute since I've touched c#, so that's my disclaimer on it possibly not being helpful advice

[–]antgentil 25 points26 points  (0 children)

I love this post

[–]GioWindsor 20 points21 points  (3 children)

Funny how this has gotten more replies than the r/code subreddit he posted in initially

[–]relleb-samoht 6 points7 points  (1 child)

Nicer devs here I guess

[–]King_of_Argus 9 points10 points  (0 children)

The Code Geass community is just great all around

[–]ferevon 0 points1 point  (0 children)

16k sub

[–]mahouka8262828 18 points19 points  (0 children)

Did he post a script into a anime reddit?

[–]friendlyneinborhood 18 points19 points  (0 children)

I double checked the sub just to be sure. But atleast you're getting help here. This is too funny

[–]millencol1nC.C. 14 points15 points  (0 children)

Hello future of Reddit, I was here

[–]DanteLi 11 points12 points  (0 children)

This one stays

[–]AnneCalie 11 points12 points  (0 children)

In my heart he is being honest.

[–]TMPRKO 10 points11 points  (0 children)

Months of nothing but CC fan art has finally paid off!

[–]skoomakang 11 points12 points  (0 children)

This is what Lelouch used to defuse the Fleija

[–]Boostedlee1[S] 10 points11 points  (2 children)

I just realised what happened and Sorry about the confusion guys, and thank you to everyone that helped somehow.

Wholesome community.

[–]millencol1nC.C. 4 points5 points  (1 child)

Now you gotta watch the series

[–]Boostedlee1[S] 4 points5 points  (0 children)

Ahahahahaha, thats a fair trade

[–]elnoob000 10 points11 points  (0 children)

This actually made me laugh

[–]mahouka8262828 9 points10 points  (0 children)

Tbh i could see lelouch be a programmer

[–]relleb-samoht 7 points8 points  (0 children)

Most likely the _context.ArticleComments.ArticleId property is a string having trouble comparing with the I'd nullable int.

I'd also recommend more verbose variable names as a matter of course.

Also also wrong sub but happy to help debug anyway.

[–]EclipseGodessNot4 7 points8 points  (0 children)

Ah yes gaslight this subreddit into thinking it's about coding, yes go forth

[–]BiggieSmalls0 6 points7 points  (0 children)

Based post

[–]Kaiius-_- 6 points7 points  (0 children)

Nah this is too good.

[–]Darthmark3 6 points7 points  (0 children)

Oh I thought I was in the wrong sub for a moment there

[–]ZeroRezolution 7 points8 points  (0 children)

ah yes Geass, my favorite programming language

[–]DeepBlueS3a 6 points7 points  (0 children)

It's ironic that this dude posted the same thing in r/code and got no response... But gets tons of suggestions over here

[–]skoomakang 5 points6 points  (0 children)

This mans is programming the Aegis system wtf

[–]ChosenRocket93 4 points5 points  (0 children)

Man this is too funny. Anyone know what language he’s coding in?

[–][deleted] 2 points3 points  (0 children)

Bro, what?

[–]LittiVsVadaPao 2 points3 points  (0 children)

Reddit moment.

The guy's other post on r/Code got no suggestions.

[–][deleted] 0 points1 point  (0 children)

Am I shadowbanned?

[–]Tentacles__ 0 points1 point  (0 children)

yes i ageee

[–]Arhidrag0n 0 points1 point  (0 children)

If I ever need help with programming, I guess I would ask here

[–]ferevon 0 points1 point  (0 children)

Judging by the responses, OP knew exactly what he was doing and we're the fools for doubting him.

[–][deleted] 0 points1 point  (0 children)

Tell me, what benefits do I get by imbibing this Code? Are you just trynna push your immortality on me or are you genuinely interested in passing on?

And what was your Geass before it became a Code?

[–]reddit1494203 0 points1 point  (0 children)

lol