« first day (1913 days earlier)      last day (3248 days later) » 

4:00 PM
just sent out 200k request and its working still has taken 25mins but is still going
@Michael I usually wrap data access in command classes
class UpdateOrInsertContact
{
    public void Execute(Contact contact, DbContext context)
    {
        //if insert context.add()
        //if update ...
    }
}
you get nice separation everywhere if you do that
Good god, it works. IT ACTUALLY WORKS. WOW, EF, WOW.
var command = new UpdateOrInsertContact();
using (context)
{
    command.Execute(contact);
}
@StevenLiekens I was heading down that route :) thanks

I think Ill do this:
    internal static class ContactDataAccess
    {
        internal static int InsertContact(Contact c)
        {
            using(LitTrackContext){

            }
        }

        internal static int UpdateContact(Contact c)
        {
            using (LitTrackContext)
            {

            }
        }

        internal static int DeleteContact(Contact c)
        {
            using (LitTrackContext)
            {
@StevenLiekens that should work the same right?
@juanvan (Assuming that was to me) Problem is that the library has no async functions in it, I was forcing the synchronous method to run on a non-UI thread and be awaited (I think)
(I have no idea what I'm talking about) Maybe I could have a single thread/backgroundworker to queue all the requests to be done on?
4:07 PM
@Michael that works but you don't get the same clean separation
your ContactDataAccess class will grow and become bloated
apart from that, no real difference
@StevenLiekens how can it grow more than CRUD?
@njallam ya it was, You want a BackGroundWorker then
when you start adding more specific methods
you could do
Task task = new Task(new Action(MailTest));
task.Start();
@StevenLiekens true
4:12 PM
@juanvan What makes that different from Task.Run?
anyone here use team foundation build?
using output location "SingleFolder", "PerProject" or "AsConfigured"?
because I tried the first two and what TFS spits out is complete nonsense
user47589
TFS is complete nonsense
4:25 PM
AsConfigured is nice in that it does exactly what visual studio does
asconfigured doesnt do the bin folder though
if you care
yeah that's part of the deal
but that's where I'm stuck
am I supposed to change the OutputPath property in my csproj files to $(TF_BUILD_BINARIESDIRECTORY)
or am I supposed to copy files from the regular output path in a post-build script
or what.
so you want asconfigured but also the bin folder
yeah because the files from the bin folder still get copied to the drop folder with AsConfigured
don't try msdn, they don't have answers
I bet they use nant to build team foundation build
so
write a post build script
4:34 PM
@njallam it is the Same as StartNew
yeah I'm heading down that road
So using Code first I set up a few classes with various properties eg:

Contact
{
public int ContactId

public string FirstName

public string LastName
}

and then I changed the property name of "ContactId" to just "id".
When I do update-database to migrate changes it says "Multiple identity columns specified for table 'Contacts'. Only one identity column per table is allowed."

Why wont it drop the original ContactID Column?
StartNew(SomeAction,CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default) ~ .Run(SomeAction)
put a [Key] data annotation @Michael
@Failsafe I did
4:37 PM
is 'id' a protected name?
@Failsafe no its not
@Michael:

public override void Up()
{
RenameColumn("dbo.Contact", "ContactId", "Id");
}
So much documentation for OAuth, sigh.
yeah sucks huh lol
@Greg are you implementing it for fun?
4:45 PM
@Failsafe I'll try that in a sec.

Ive never actually messed with the Up() Down() methods before. this is what it looks like on its own: i dont see whats wrong?

            DropForeignKey("dbo.ContactContactRoles", "Contact_ContactID", "dbo.Contacts");
            RenameColumn(table: "dbo.ContactContactRoles", name: "Contact_ContactID", newName: "Contact_Id");
            RenameIndex(table: "dbo.ContactContactRoles", name: "IX_Contact_ContactID", newName: "IX_Contact_Id");
            DropPrimaryKey("dbo.Contacts");
don't add a new primary key just rename the old column
@Failsafe ohhh.. well nvm, I moved "DropColumn("dbo.Contacts", "ContactID");" to be above AddColumn("dbo.Contacts", "Id", c => c.Int(nullable: false, identity: true)); and that worked i guess
@Failsafe I will just rename though in the future
ahh
ContactId probably still had the identity flag set to true even though you removed the primary key
@Failsafe do you know why it messed that up on its own?
not really no
4:49 PM
@juanvan How could I await the result of this?
code first EF doesnt' really know whats going on behind the scenes
@Failsafe fair enough
in your DB i mean
@njallam I am trying to figure all that out Meow ;-)
new to is as well
What do you mean await the results? how to work with the Task<T> results?
yeah
4:50 PM
meow listen here
Right now I execute the Process with downloadTaskQuery.ToArray() - and it returns a Task<string>[] but I have no code using it when its' done
I put a break point on it, and it never hits but for the first trip with the debugger
debugging async is a PAIN
if you have a Task<string>, it's an object, that says "I don't have a string yet, but i will at some point"
to wait for that string, you use await
string someString = await someTaskOfString;
TFW meta.SO has a fucking thread about explaining memes
wat
4:57 PM
504
Q: The Many Memes of Meta

TheTXICatchphrases and concepts that spread from person to person are known as memes, which, courtesy the Internet, can now explode across the Earth like a highly contagious virus (hence "going viral"). As with their real-life counterparts, some infectious diseases are global (pandemic), while others a...

LETS ADD A DESCRIPTION FOR ALL TEH C00L MAYMAYS SO PEPOPLE UNDERSTAND
inb4 "Stack Echange presents our new Meme Documentation Libraryâ„¢ available now!"
had to trademark that
well, the lotto is up to 1.3 billion, think i'll win the lottery this week
good thing powerball lowered the chances in winning in like july 2015
@Failsafe then put them back up in 2015
went from 175mil to 295mil
thats worse
.0000000003%
it's mine, if you even thinking of touching it i'm gonna getcha
5:03 PM
that's your chance of winning
if you win start a company and hire me
pls
ill do the same
deal
slob
Do you even know what you would do with that much money?
yea
set up trusts and live off the interest
5:04 PM
I worry about getting bored
like any smart person would do
1.3b in interest is like 800k -1m a year
after taxes, you would probably get like 600M
lol my dad won $100 in the last drawing. woohoo
hopefully you live in a state where they don't publish your name
or photo
i never ever win.
cuz if so you're dead
someone will kill you
5:05 PM
yeah, id immedately get a lawyer
unfortunately
i'd immediately get police protection
then move as far away as possible
probably switzerland
winning the lottery isn't a fucking joke
you pretty much have to give up whatever life you had and start over
can you split it during collection? Id obviously gift a ton of money to friends and family. but gifting tax would be insane
don't ever do that
hire a retainer and write up contracts before you turn in the ticket
dole out portions before anyone knows you won
there's a reddit thread about what you should do if you win the lottery
there was a fantastic post about steps to take
yeah. that would be a good read
user47589
if you win the lottery, the very first thing you should do is hire a lawyer.
5:10 PM
/u/BlakeClass
makes winning the lottery scary
absolutely
i love those statistics
8 figure lottery winner makes homocide 120x more likely
holy shit
lol time to go rogue
user47589
i believe it
what's a homocide btw?
5:13 PM
human kills a human
user47589
lol
user47589
homicide.
murder
oh fuck
fuck off
user47589
you said homOcide
no i didnt you're lying stop oppressing me
user47589
5:14 PM
homocide is pretty gay.
i thought it was some guy sodomize another something
@Failsafe yeah for sure
@Michael yeah i'd still work, idk doing what
user47589
i will never stop oppressing you @failsafe
@SteveG can't stop working
useful chat tip: if someone made some funny typo, make sure you only remind him/her after it's too late to edit
user47589
5:17 PM
i'll never stop reminding him of his typo.
wow, weird reddit thread about winning the lottery. Apparently you have to decide how much to give to family and friends...what if the guy didn't want to give anything? This world's way too crazy
What if the family is dead
or is Dead to you?
@Failsafe yep, i want to say i'd work at the same place, even if i did win, but i also know i'm at least 60% full of shit when i say that
@juanvan exactly
@SteveG I would move as far away as possible
there's no way i can stay in contact with anyone personal that knew i won
5:19 PM
@juanvan well, they will either revive and say they love you, or sue you
except my parents probably
i'd want to move somewhere warm, where my door won't freeze to the point where it refuses to shut cuz all the stuffs in there is frozen rock solid
think that all you get a tax break for giving it to family
@tweray sue the lottery winner for what? having money? what is this soviet russia?
^ for back Child up bringing Cost
5:20 PM
-_-
you mean child support?
@NicolásCarlo anything, like you broke my car by slamming the door, you didn't pay for your soda while visiting me, your last hug on me cause me catch cancer, etc
totally crazy that story about Jack Whittaker
user47589
i would sue my rich family member before they sue me. pre-emptive suing, the Bush doctrine applied to family.
@tweray well moving away from such crazy family and friends is not a bad idea, regardless of whether you win the lottery or not
5:22 PM
@ShotgunNinja Ya but that is when the parents pay, this is the Kid won the lottery and did not give any to the parents
@Amy Sue you to stop you Suing me
@Amy lmfao
@NicolásCarlo read this cnn.com/2015/10/15/opinions/cevallos-aunt-nephew-lawsuit welcome to murica
I know about that case @tweray and she lost
but, you know, you can't stop crazy ppl
if there's a damn lawsuit, then you need to pick it up
You can sue based on the fact that someone else in the family influenced the winners decision
and probably win
5:25 PM
right but i mean people here in Argentina sue others for having blue (or brown/green) eyes. doesn't mean that goes anywhere though
@NicolásCarlo $1.3b isn't involved
either way, you're just proving my point that these people are crazy
yea
look at those stats
in the reddit thread
shit is no joke
yeah
best course of action is probably buying a new identity with your 1.3 b
There a way to see all the Tasks an awaited method made?
in the debugger
5:26 PM
and then moving to your dream country/location
@NicolásCarlo like i said, put it all into bonds/trusts
live off the interest
???
profit
@KendallFrey no watching now though
@KendallFrey i like how he runs through waste deep water at the same speed as he runs on flat land, lol
but the bullet sounds, are crazy realistic
It's supposed to be a realistic combat sim
as in, take one shot and you're down
5:29 PM
you ever play the game insurgency?
that game is fun
yeah @KendallFrey this game looks cool
Yeah I'd love to try it
that zing / buzz when the bullets were flying made me duck lol
hah
triggered
5:37 PM
So with these EF migrations... Im changing around little things all the time with classes. It seems weird to constantly run the add-migration update-database command all the time.

and I have to add a migration name evertime and its weird to say add-migration "ContactChangedProperty1" "ContactChangedProperty2" .. etc

Is this really how its done, or is there something im missing?
Are you running the Add-migration everytime?
@juanvan yeah, Im literally typing the add-migration <name> command + update-database command everytime
Ya that is how it goes - every change is tracked and you can roll back
it seems a little tedious and weird doesnt it?
maybe just because I'm tinkering a lot as I go.
not really, - you add tables X.Y,Z for Feature A you can say that in the migration
5:41 PM
but what If I just added a simple property / column?
or changed the column name
Who says you can not take the Finished code first put it to a new project and have 1 commit on it when you do release
Then won't have all those migration scripts
Most times you are adding more then one column or one type
but as im building it, i'm going to have a ton of migration scripts
ya, since you are doing it in a learning setting
if you knew how the models were to be made on paper before making the tables be less of them?
Yeah definitely... but we are a really small department, and dont have a business analyst or anything to communicate with our users, so things constantly change. or my supervisor will say change this, or add that.
@SteveG Yes, and No. I'd like to actually build an OAuth Server application. That is light weight, for implementation rather than Microsoft's heavy IdentityServer
user47589
5:48 PM
occasionally i wipe the database and all the migrations, and create a new migration for the entire DB.
user47589
so 20+ migrations --> 1 migration
sometimes I make a program I know I will toss away that makes the tables
@Amy do you have a project in the solution thats' only job is EF updates, then have another EF.data that the models are pulled from?
@Amy sounds good. Just wanted to make sure
user47589
no @juanvan, i keep my migrations alongside my dbcontext.
was wondering, a Julie Lerman(sp?) she does it that way
5:53 PM
So if you have a bad pending migration do you know a simple way to cancel it?
user47589
what do you mean by "bad pending migration"
user47589
if the migration isn't committed to the DB, just delete the migration file.
lol because i tried to name it the same name as the previous migration
user47589
i think that's possible. migrations are given a timestamp to make them unique.
Oh I see
6:06 PM
posted on January 11, 2016 by Visual Studio Blog

Great apps—like great artists, actors, and athletes—are great performers. Human beings validate and continually improve their performances through extensive training, practice, rehearsals, and after-the-fact reviews. We achieve these same ends in software development through many levels of rigorous testing—or continuous validation—across the entire app lifecycle. Chance

am creating a list of URL, List<string> I am loading the list in an Async method, My If statement is to check if the URL already exists in the list, but it is causing a Break to happen that the "process is running a very long operation that took longer then 60 seconds" The list contains some 160k items
hello fellas.
:)
I have a simple questions and I know you guys might answer it. :)
@mark Is your last name wells?
hehe
here.
I am using 3 tier Hierarchy in my C# window form.
This is the scenario.
...
I have a button in my 3rd tier which compose of window form. while the 2 other tiers have only .cs(class) file.
I have a conditions in my .cs(class) file located on the first tier where I want to visible = false in 3rd tier.
@Michael
you have an idea? :)
my button is already in modifiers = true so its already shared.
My problem is, I can't find it whenever I am typing in my .cs (class file)
@Michael? :)
user47589
um, okay, you have three projects, one of which is a winforms app, and you have some business logic in one of the other projects that you want to affect your winforms app. correct?
6:19 PM
Yes @Amy exactly :)
user47589
if the winforms app references the other two projects, those other projects cannot reference the winforms app directly. you can pass in a reference to a button to the method in your library
user47589
thats the only way.
I am trying to add namespace but it couldn't locate the winforms which is my 3rd tier.
user47589
if the winforms app references the other projects, they can't reference it.
I got your first point but, how can I do pass the reference button to the method into my library? :) hehe
6:23 PM
don't do that
you shouldn't do that
Oh @tweray then what is the best and easy way to do that?
I mean to solve my issues. :)
user47589
you shouldn't do what, @tweray?
I think @Amy has a big point.
even passing standard winform control into business logic will be considered antipattern. controlling view is view's job, don't leave it to business layer
But if you have any suggestions @tweray, please share it to us so that we may know.
You guys wanna see my codes?
user47589
6:26 PM
i agree, @tweray. but correcting his architecture is beyond the scope of the question
Yeah @Amy you are right but thanks to the idea of @tweray, it makes sense. :)
well, it's going to be dirty, but you can pass built in winform controls if that can solve your problem. but after all, the only guy should control your winform elements is the winform project, all lower level layer shouldn't even care how the control look like
SqlCommand check = new SqlCommand();
check.Connection = dbcon.getcon();
check.CommandType = CommandType.Text;
check.CommandText = "SELECT * FROM tblname";
SqlDataReader drCheck = check.ExecuteReader();
while (drCheck.HasRows == true)
{
drCheck.Read();
if (...) // my conditions
{
// I want to put here the modified public button into visible
}

}
drCheck.Close();
// That is my BAL
>the only guy should control your winform elements is the winform project guy who's deleting all of the Winforms in your project
FTFY
@tweray & @Amy that is my code
user47589
6:29 PM
i guessed that.
@mark make this method return a bool, call it, deal with your button in the winform class
@tweray you have a point. but I really want to make the button into visible in the BAL part.
The defeats the purpose of having a BAL
And do you mean DAL?
DAL // is the connections storage.
user47589
"but I really want to make the button into visible in the BAL part." that's poor design.
6:33 PM
@Amy hehe so,
sorry
BAL = Business and Anythingelse Layer
but how can I do it my winforms instead.
I got my build down to one error: [build link] fatal error C1047: The object or library file 'C:\Users\~\Desktop\SVN\TortoiseSVN192\ext\apr\release_win32\apr_fnmatch.obj' was created with an older compiler than other objects; rebuild old objects and libraries. How can I rebuild a single file?
well, don't understand what make it so hard, just as i said, make it return a bool
@mark like tweray said, have a method in your BAL that returns the condition
In your code behind do something like
myButton.Visible = BAL.ShouldThisButtonBeVisible();
So instead of:
if (...) // my conditions
{
// I want to put here the modified public button into visible
}
6:36 PM
okay @tweray let me try that one. :) I will let you guys know if I am done fixing this stuff. Thank you @Amy and @mikeTheLiar :)
if (...) // my conditions
{
       return true;
}
sure sure @mikeTheLiar I'll try it :)
and thank you @tweray :)
Or really just return whatever && somethingElse || someOtherThing;
while (drCheck.HasRows == true)
{
drCheck.Read();
return (drCheck["PayrollFrom"].ToString() == belpayroll.PayrollFrom && drCheck["PayrollTo"].ToString() == belpayroll.PayrollTo && drCheck["PayrollDate"].ToString() == belpayroll.PayrollDate && drCheck["EmpID"].ToString() == belpayroll.EmpID);
}
drCheck.Close();
// like that one @mikeTheLiar ?
I got an error in my return part.
user47589
...
6:40 PM
why i feel somehow the same as i saw syrian refugee orphans when i saw un-experienced developer dealing with winform
user47589
i think it might be helpful to tell us what error you got.
hehe sorry @tweray I'm a beginner and still learning some experiences.
Also, I don't know enough about what you're trying to evaluate. But basically instead of trying to set the button's property return the value that you want to set the property to
@mark no, it's not totally your fault, winform sucks
So if you're iterating over a dataset, you actually probably do want something like my original example
6:41 PM
the error is in my return (...); // ... keyword must be followed by expressions.
Oh @tweray hehe really. :) But I am gaining some background here for C#. :)
so, I have to start in window form as a beginner. :)
And for that matter your reader will never be closed - you should probably just wrap that in a using block
@mikeTheLiar how can I do that? :)
I can't see some helpful code blocks when I am typing the "block"
So something like this (disclaimer - I'm just typing this directly into the chat window so this probably won't be perfect but it should give you an idea)
user47589
fucking angular. die in a fire
using(var myConnection = getConnection())
{
    // other db boilerplate
    using(var myDataReader = cmd.ExecuteReader())
    {
          while(myDataReader.Read())
          {
                 if(someCondition) { return true; }
           }
    }
  }
6:49 PM
How can i unshelve a shelvset by someone else
on my local machine
@Amy angular already died, and reborn as angular2
user47589
angular2 needs to die in a fire too.
Angular 2: Electric Boogaloo?
user47589
Fiery boogaloo
Angular 2: Angle Harder
Just when you thought it was safe to go back into web development...
6:50 PM
angular2: try burn me, i will give you an angular3
user47589
angular is the mythical hydra! cut off one head, two more shall appear
user47589
we are so screwed.
just sell management on VanillaJS and forget it all
user47589
angular(n) --> fire(n)
tbh, angular2 seems to be pretty awesome, except the name
6:51 PM
that typescript
tho
it's basically a different animal
user47589
it can't be worse than angular1
user47589
i love typescript. its my friend.
TypeScript's legit in my experience
yea
my question is
can i just "vNext" my applications
6:52 PM
I do remember running in to some weird compiler bug once though
so to speak
Like, Visual Studio didn't believe the types matched up even though they did
user47589
i want to upgrade to TS 1.5. it's got decorators!
I ended up just having to declare it Any and it worked fine
i can see angular saying "Hey have fun rewriting all the dom's because fuck you dumb ass hahahaha"
and i suck it up because ultimately angular2 is better than a1
6:54 PM
i feel that's going to be the future
user47589
the angular1 team just threw a bunch of stuff together and called it a finished product. why the hell are there service, factory, run, config, etc methods?
yea but i want to vNext my angular project
without .NET
grr cant figure out how to get the shelveset checked in by someone
never dealt wtih shelvsets before
@Obviously they need to add you to code review or you need to be a project administrator to view them
user47589
i toyed with them 3-4 years ago
6:57 PM
do you see a "Owner name" box anywhere?
user47589
you can fix your problem by moving off of TFS
Should be File -> Source Control -> Unshelve pending changes
I can view the shelvset on the online tfs thingy
Why cant i get it
in VS

« first day (1913 days earlier)      last day (3248 days later) »