Seeding a Many to Many With Entity Framework and C# Dynamic

In the previous post, we created a single table (speakers) with Entity Framework Code First from a JSON file with Visual Studio 2015.  Now we will add a sessions table that has a many to many relationship to the speakers table.  That is, speakers can have multiple sessions and sessions can have multiple speakers.  We do that but simply creating another entity (sessions) and add to it a List of speakers and then adding to the existing speakers table a list of sessions.  The new table (models) look as follows. GitHub Repo: [crayon-565e4a2f404f4857620783/] Then,  we need to add sessions data (from the JSON file) but when we add the sessions, we need to add … Continue Reading

How To Create a Recorded Hangout

I’ve recently been wrestling with the best way to do a remote interview.  Because the interviewer and interviewee are in different locations, the lag can cause very strange side affects and synchronization issues.  On Air Hangouts seems to do the trick quite nicely. Here is a video with me giving instructions.  Below that is the result of my second actual on air hangout produced this way. … Continue Reading

Refactoring C# Code With ReSharper Help


  A pattern that I do quite often is to first right out code that actually works, then when I see a pattern repeat itself, I like to refactor that code to try and avoid the repetitive code.  Reasons include: Smaller Code Less Chance For Error Don’t Repeat Yourself (DRY) As an example, the c# code I’m working on now involves reading key values to be used with the Stripe payment service.  Here is the code I first wrote: [crayon-565e4a2f41315575279941/] The first thing I do is to look for the pattern and try and pull out variables that I know are going to be helpful in refacotring. You can see below that I pulled out the keyAppName variable and I also changed the assignment to be to a new variable rather than … Continue Reading

ReSharper Continues to Make My Life Easier as a Programmer


Again, it happened.  I was about go searching the web for the string format parameters to figure out how to format just the day of the week.  I type some code like this: [crayon-565e4a2f421f4602607827/] And up pops up the below screen from JetBrains Resharper giving my choices for ToString(). Very nice! Just sayin... … Continue Reading


Get every new post delivered to your Inbox

Join other followers: