« first day (3163 days earlier)      last day (1770 days later) » 

2:00 PM
does that mean i need to add all off model properties to every form
?
that doesnt seem right...
 
You definitely do not need to add all your form properties
Unless you need all the data
 
no i need the id of the one im changing
 
It's hard for me seeing just this one page and controller and no wider context. Perhaps FromBody attribute may help?
is ID part of the route? i.e the url is it domain/controller/action/id ?
 
@SamuelWakeman FYI the Html.HiddenFor will create a <input type="hidden" id="YOURIDHERE" value="IFTHEREISAVALUEITWILLBEHERE" />
so you can still pass the data, but it won't be visible on the page
YOURIDHERE will be the name of the variable you pass to the HiddenFor
 
aha moment!
 
2:03 PM
IFTHEREISAVALUEITWILLBEHERE will be the value of your variable if it has one
 
You need string approved not bool
 
wait what
you guys are saying too many things
im confused
 
OnPostAsync(int id, string approved)
 
bool?
 
if(approved == "true") ...
 
2:04 PM
not bool*
 
hidden is a TEXT control
 
Sorry, I'm just looking through your messages from earlier :D
Can i ask, why is your post method async?
It doesn't necessarily have to be
Unless there's context i'm missing
 
async is not really relevant to the issue at hand
 
because thats the default it gives you when scaffolding a model
 
might be
!!shrug
 
2:06 PM
¯\_(ツ)_/¯
 
lol wot
It didn't give a public ActionResult OnPost(Product product)
 
@CaptainSquirrel That's so 2010
 
hey man
if it ain't broke
 
Someone translate "Stagnation ist Rückschritt" to english for me
 
@SamuelWakeman just humour me undo everything and just change bool approved to string approved...
 
2:08 PM
!!tell SquirrelKiller translate.google.com
 
@CaptainSquirrel Command translate.google.com does not exist. (note that /tell works on commands, it's not an echo.)
 
U FUKIN
lil shit
Stagnation is regression
how is it regression tho
Threads
Threads everywhere
 
ah right, regression
I'm coding in german basically so it's difficult sometimes
 
Because stagnation is the act of coming to a standstill, which is regression from moving forward.
 
doing that give me nasec
wait now i cant connect to iss express?
what did i do
 
2:11 PM
Restart all the things :)
what's a nasec?
null as shit exception c?
 
!!googleme nasec
 
Ah right
 
@Squirrelkiller I had a premonition you were going to type that command so didn't do it myself, making you the ultimate mind reading chatbot. That's so deep on too many levels.
 
2:14 PM
I can't wait for my first senior highschool exception, sounds painful.
 
@HollyStyles wot
 
OMG we are yack shaving now
 
so if i turn it to a string
 
this makes no sense
 
2:16 PM
approved = "value"
 
Did you try it?
The trouble with convention over configuration is: If you haven't studied the convention your SOL :)
 
@Squirrelkiller for the libraries stuff?
 
user10864482
good morning
 
It's afternoon here
 
@Wietlol Yup
 
2:27 PM
because I used wagon-git which has docs for github and bitbucket
 
user10864482
as a convention I always start with good morning. The power of internet; all together in different timezone
 
i did try it debugger seems to work but changes arent being saved now?
public async Task<IActionResult> OnPostAsync(int? id, string approved)
        {
            var product = await Context.Product.FirstOrDefaultAsync(
                                                    m => m.ProductID == id);

            if (product == null)
            {
                return NotFound();
            }

            if (approved==null) { Product.Approved = true; }

            else { product.Approved = false; }

            await Context.SaveChangesAsync();

            return RedirectToPage("./Index");
 
So approved is not null?
 
at run time approved either == "value" or ==null
 
For rejectcase?
 
2:29 PM
for reject case it == null
wait i might just be an idiot
sec
 
paste bin the cshtml again
 
lol wait
the fix
is just dont use the apprroved value because the reality is the only time you hit that button is if you want to change it
 public async Task<IActionResult> OnPostAsync(int? id)
        {
            var product = await Context.Product.FirstOrDefaultAsync(
                                                    m => m.ProductID == id);

            if (product == null)
            {
                return NotFound();
            }

            product.Approved = !product.Approved;

            await Context.SaveChangesAsync();

            return RedirectToPage("./Index");
        }
im smart
i swear....
ty for help
when the real problem is im just an idiot pog
 
Welcome to software development, where 50% of errors is you being dumb.
 
user10864482
@SamuelWakeman don't diminish yourself; programming is hard and its easy to make mistake. Also per definition a 'problem' root is almost always trivial afterward
 
user10864482
2:44 PM
I'm dumb too ;)
 
@SamuelWakeman Rubber Duck
 
Get one & put it at your desk
then when you have issues like this, explain the issue to the rubber duck
But remember, its a rubber duck
It doesn't know how to program
You must explain to it what you are trying to do
 
thats actually not a bad ide
 
2:47 PM
Which is exactly why it's a thing :D
 
idea*
 
fyi you can press up on your keyboard and edit your last messages
 
is rubber ducking a thing
 
oh thats cool
 
2:47 PM
for typos
if you also hover your mouse to the left of the message, there is a down arrow
 
almost like this was designed by competent people who werent me
 
click that and there's an "edit" button 😃
lmao
 
i knew about clicking and editing but thats way too much work i have to move my wrist
 
i know right
 
well now im at the real problem that i can only solve by quitting my job. I have no sense of direction on what to do next
 
2:51 PM
lol wot
am confuse
 
scratches head
lol wot
 
!!learn lol wot
 
@CaptainSquirrel Command lol already exists
 
It's called Rubber Duck Debugging
 
2:52 PM
@CaptainSquirrel That didn't make much sense. Use the !!/help command to learn more.
 
..
you are fucking kidding me
 
@SamuelWakeman: your profile says you're an intern right now, is that the case?
 
!!Are you fucking kidding the Captain?
 
@Squirrelkiller No
 
2:52 PM
LIAR!
 
HEY
 
i think...i think the captain is going mental..
 
yeah. im trying to change jobs soon got an interview lined up for monday
 
There's only room for one Liar around these parts
 
WHY ARE YOU HERE
 
2:53 PM
he's arguing with a robot
 
!!help lol
 
throws schooma
 
@MikeTheLiar lol: User-taught command: That didn't make much sense. Use the !!/help` command to learn more.`
 
currently get paid less than minimum wage because im "volunteering" and the boss has no idea what hes asking ever
 
fuckin rofl
!!info lol
 
2:53 PM
oh i fucking hate you cap
 
SKOOMA
 
@MikeTheLiar Command lol, created by Awal Garg on Thu, 07 May 2015 10:34:58 GMT
 
ITS CALLED SKOOMA
 
i really really do
Harry
 
hi
 
2:53 PM
Awal Garg, Master Troll
 
i didn't ask for your inputt sir
 
input
 
right that's it
 
Guys sandbox please!
 
i'm going home in exactly 7 minutes.
Hey, that's my job @HollyStyles :(
 
2:54 PM
sorry mate, ily really <3
 
basically he told me an intern to create amazon bymself
 
Awal Garg, you are a genius.
 
> telling a bunch of ROs to play in the sandbox
 
hahahah
 
how hard could it be
 
2:55 PM
lol what
 
except add feature x y and z that changes on the daily
 
WTF are RO's ? LOL WOT
 
Re: rubber duck debugging, it's absolutely a thing blog.codinghorror.com/rubber-duck-problem-solving
 
!!/help
 
@SamuelWakeman Information on interacting with me can be found at this page
 
2:57 PM
im so glad that wasnt a rebecca black link
 
damn
i forgot it was friday
 
@HollyStyles tl dr; im getting abused because my boss doesnt understand how to competently carry out a coding task.
 
what hell did yo just unleash upon me
 
this datetime convert that worked when i checked it last no longer works
 
2:58 PM
why did i click on that
oh know
 
Its friday my dude
!!c#
 
May 5 '16 at 15:17, by BoltClock
THIS ROOM IS OUT OF CONTROL
 
IT IS FRIDAY MY DUDE
 
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
 
@CaptainSquirrel not today, Satan
 
2:59 PM
you
person you
 
@SamuelWakeman: what part of the world are you in?
 
michigan
usa
near lansing
 
Ah shame (for me) I am stranded on a small island in the North Sea.
 
HOME TIME
BYE
 
Do you know a Steve G @SamuelWakeman
 
3:01 PM
BYE LOL WOT
 
before i live
hi cindy
 
LOL WOT
 
WOAH WOOAH WOAH
Dont SLANDER us in that way
 
3:02 PM
here is the better version of the song friday btw
 
its funny because US is the child of the UK
so if the UK is trash
 
What does that make the US
now i am really leaving, bye
 
gestures broadly at everything that is the US
 
A giant flaming dumpster, have you been paying attention at all for the last three years?
 
3:02 PM
o/
 
later cap'n
 
s/ree/irty/
 
OMG my eyes are streaming, I can't see. Laughing so hard!
 
s/irty/ree hundred/
 
@MikeTheLiar should i know steve g or is that a lie :p
 
3:03 PM
You'd know if you know him.
 
@SamuelWakeman he used to hang out here, he lived in Lansing.
 
He's the guy who lives in the woods, livin' off the land screamin about the gubmint and gyna. He may or may not be dressed like Rambo
 
i mean its a city its not a small town where everyone knows everyone youd have to give me more than a steve g
ok
yeah i dont know him
 
> not a small town
 
ok i neeed to actually do something now
 
3:05 PM
> population 116,000
um
 
you need to go and find steve g
 
I have news for you.
 
Mike's a Coastie, he assumes everyone in the midwest knows everyone else in the midwest because there are like, what, fifteen people in the entirety of the thirty some flyovers?
 
I mean
Sidney's right though
You'd know if you knew Steve.
!!catrent
 
@MikeTheLiar That didn't make much sense. Use the !!/help command to learn more.
 
3:06 PM
!!rentacat
 
Feb 19 '15 at 16:57, by Steve
i'm looking for a new apartment and this one rents cats, wtf
 
oh fuck maarten's here
 
3:20 PM
F***YEAH
Great weekend feeling
.Hey mike,
Finally found the bug, it wasn't in the SQL code it was in bad data!
Well not bad data just outdated data causing werid things in the frontend
 
3:31 PM
I have no idea what you're talking about but I'm happy for you
 
4:25 PM
 
user10864482
4:36 PM
i'm starting to realize 'squirrel' is a thing for SO username
 
Gone but not forgotten, RIP 007.
 
 
1 hour later…
5:49 PM
THATS A FUN XKDC
whats with the spongebob caption
 
user10864482
6:04 PM
@SamuelWakeman still building amazon?
 
i mean i go to a point rn where like i honestly have no idea what im suppposed to be doing
cause like i could go a thing on the website
but no matter what i do it feels fairly pointless
i have no direction
here
lit just watching thenewboston on youtube rn so I'm at least learning might go back to smtp in a bit
 
user10864482
@SamuelWakeman do you know UML for diagram? It can help organize
 
uml would be great. and then my boss tried to show me the product model
of what it might end up looking like
and it makes me want to go hide in a small corner
likethe attribute list for global abstract product alone would be at least 10-15.
 
user10864482
do you know Entity framework?
 
You ever talk to your boss, Sam?
 
6:11 PM
i know a little bit of entitty fw. not much was experiementing with poowertools earlier
i talk to him about once or twice a week
in depth anyway
 
About how this project is going to take way more people than just you
and how it sounds like a death march when you described it to us
 
yeah pmch. I was pretty sure but tbh having no prefessional developer expereinece i wasnt sure it was a death march until i got here. i was planning on talking him to about it monday
of next week after my job interview
here being this chatroom
recently unlocked chat priveleges. again I am small baby intern codeman
who is smart i swear.... but also dumb af
 
Just lacking experience. Happens to everyone.
 
on the bright side its a little after 2 pm bhere time for coffee aka drink of the Gods
 
I hate Azure AD
I just want to use a .net core web app with AzureAD with single tennant
and there is always some problem either with the code or configuration on azure
 
6:21 PM
did you try just not having some problem. works p well from experience
(jk)
 
Got my first SO ever --> Process is terminating due to StackOverflowException. :D
 
nice!
 
@SamuelWakeman if it makes you feel any better I'm a goddamned moron and I seem to be doing okay
 
yeah but youre a liar so that makes you a genius?
 
The only lie I've ever told is this one.
 
6:31 PM
brain hurts
 
Is anyone here an expect with .net core Authentication and Azure AD?
expert**
 
i mean not even kind of expert but ive spent my past few days going through the .net core authentication documentation
if you've already gone through the documentation though then i can't really help you
i assume you have but just in case
 
6:50 PM
i have, my current problem has to do with single tenant vs multi tenant
I'm trying to build this:

https://github.com/microsoftgraph/aspnetcore-connect-sample
if i set it to multi tenant on azure (anyone outside the organization can join) i can get it to work
but if i try to go single tennant, i can't figure out how to pass graph the tenant id
 
anyone good with sql?
i posted some stuff in the sql room, but it appears to be ded rn
 
whats your question on sql
?
 
Define "good"
 
right ^ me too
 
in SQL, 30 mins ago, by Wietlol
create trigger trig
on Person
after insert
as begin
	if exists(
		select *
		from inserted
		where name = 'Wietlol'
	)
		throw 50000, 'Wietlol is a reserved name.', 1
end
 
6:56 PM
I take most of my SQL questions to Database Administrators
That's not a question.
 
i didnt say question
i said "stuff"
 
Tis a fair cop.
This is MS SQL?
 
ye
 
just for the record in sql write sql statements in all caps and right yyour variables lowercase, makes it easier to read
 
i disagree
ALL CAPS MAKES ME FEEL AGGRESSIVE
 
6:58 PM
@SamuelWakeman Do not do that.
 
why not?
 
lowercase sql is best sql
 
is it really?
 
Well for one you don't have to fuck around with shift and/or caps lock
 
anyway, it is not working the way I expected it to be, so i am kinda confused
 
6:58 PM
Anyway
Try raiserror instead
 
Lowercase corrosponds to smaller ascii values, so they are higher performing.
 
raiserror will stop execution with a sufficiently high value
And yes it's raiserror and not raiseerror
 
I tried rollback, I tried rollback transaction, I tried raiserror(), I tried throw ...
 
It's not really a big enough difference to be noticable, but performance adherents like mike will bitch about it non-stop.
 
HAMMERTIME!
 
6:59 PM
All of that aside, don't use triggers
 
@Sidney no its the opposite a=97 A=65?
 
Every time you use a trigger a full stack engineer loses its wings
 
😬 dammit, it was almost a good shitpost.
 
lmao
i think you mean ever time you use a trigger a full stack engineer gets triggered...
 
every time I pull a trigger, a birb dies
 
7:02 PM
:(
 
(i dont miss very often)
 
@Wietlol I only skimmed this but it might be helpful dba.stackexchange.com/q/172159/28164
 
Obligatory Best Birb youtube.com/watch?v=cnSQALaTXvM
 
It's an update not an insert but I imagine the principle is the same
 
i think it might be some setting I turned on or off that might have messed with the transactions or something
 
7:11 PM
Think real hard, did you check the "fuck up transactions" box
 
I might have...
i dont remembereru
 
sounds like rubber duck time
!duck
 
!buck
 
it also might be the time to shout a different word loudly at your computer
that helps sometimes
 
FUS?
 
7:21 PM
he really likes to yell at us.
#princess bride rhymes
 
7:44 PM
i appreciated the quote
hey guys my is there away to specify a foreign key access
 
in EF?
If your foreign keys are already set up, you do an .Include on your query
 
no in access
as in ms access
 
my boss wants to move things there for when he inputs the thing to sql so i can put on the website
 
so he wants you to do this whole thing in access?
 
7:51 PM
no hes doing thins in access and then hes gonna give the excess files to me as a csv to import into an sql
the jokes on him though because i wont be here to do that
 
good, that sounds like it sucks to have to do
 
thats not an ethics problem
?
on my end
 
I mean, you should tell him that this is going to be a pain in the ass, and suggest a better way of doing it
but if he ignores you, as he probably will, what're you gonna do
 
i mean the alternative is to have him put them all in sql himself right
?
 
That'd be ideal, though that's not gonna happen
At least get the Access files from him
I'm assuming you're using MS SQL Server eventually
What kind of data are we talking here
 
7:59 PM
yeah probably
 
like, all your products and stuff
 

« first day (3163 days earlier)      last day (1770 days later) »