blog.devdave.com
DevDave: July 2011
http://blog.devdave.com/2011_07_01_archive.html
Confessions of a Passionate Developer. Monday, July 25, 2011. Finally found a cool use of a SQL Cross Join. Lets say you have a list of contacts stored in a contacts table and a list of attributes stored in an attributes table. So lets say that each contact can have one or more attributes and each attribute can be used on one or more contacts. To do this we would need to use a many to many table, something that stores the id of the contact and the id of the attribute. For example:. Subscribe to: Posts (A...
blog.devdave.com
DevDave: May 2014
http://blog.devdave.com/2014_05_01_archive.html
Confessions of a Passionate Developer. Monday, May 5, 2014. Pimp your Bash console on Windows. Since I have been doing so much Git work I wanted to post some things I do to pimp my Bash console out. First thing is we need to get to our home directory. Do this by typing this in your bash console:. This should change your prompt to point to . The next thing is we need to see if there is already a .bashrc file. The easiest way I have found to do this is to type the following in the bash console:. Shortcut t...
blog.devdave.com
DevDave: Unit Testing Async Methods with Moq
http://blog.devdave.com/2014/02/unit-testing-async-methods-with-moq.html
Confessions of a Passionate Developer. Saturday, February 22, 2014. Unit Testing Async Methods with Moq. The other day I was pairing with a colleague. We where working on unit testing some classes that where using the new async and await features. We ran into some issue trying to get mocking working for our classes dependencies. Here is some example code on how we got things to work. So given the following code:. 160; . 160; . 160; {. 160; . 160; . 160; }. 160; . Class2 = class2;.
blog.devdave.com
DevDave: February 2014
http://blog.devdave.com/2014_02_01_archive.html
Confessions of a Passionate Developer. Saturday, February 22, 2014. Unit Testing Async Methods with Moq. The other day I was pairing with a colleague. We where working on unit testing some classes that where using the new async and await features. We ran into some issue trying to get mocking working for our classes dependencies. Here is some example code on how we got things to work. So given the following code:. 160; . 160; . 160; {. 160; . 160; . 160; }. 160; . Class2 = class2;.
blog.devdave.com
DevDave: August 2011
http://blog.devdave.com/2011_08_01_archive.html
Confessions of a Passionate Developer. Thursday, August 18, 2011. Using the Flags attribute with an Enumeration. I was recently tasked with adding an attribute to an object. This object persists in the database and I assumed that adding an attribute meant I would add a new property to the class, add a new column to the database and tie it all together. 160; None = 0,. 160; Red = 1,. 160; Blue = 2,. 160; Yellow = 4,. 160; Green = 8,. 160; White = 16. Lets add some colors. MyColors = myColors C...
blog.devdave.com
DevDave: January 2013
http://blog.devdave.com/2013_01_01_archive.html
Confessions of a Passionate Developer. Wednesday, January 23, 2013. Mocking an internal interface with Moq. The other day I was trying to write some unit tests on a public class with an internal constructor. In order for the test project to get access to the internal constructor (primarily used for testing) I had to add the assembly: InternalsVisibleTo to the AssemblyInfo.cs file and specify the class library I was testing would expose its internals to the test class library, for example:.
blog.devdave.com
DevDave: Setting up Web API 2 with Windsor using OWIN hosted in IIS
http://blog.devdave.com/2015/05/setting-up-web-api-2-with-windsor-using.html
Confessions of a Passionate Developer. Saturday, May 16, 2015. Setting up Web API 2 with Windsor using OWIN hosted in IIS. Tldr; Get the code from my Github repository here: https:/ github.com/devdaves/ExampleWebApi. Start a new ASP.NET Web Application. Select the Empty template. Don't check any of the core references (Web Forms, MVC or Web API). Once the project is ready to go, open the package manager console and run the following commands to install the necessary nuget packages. 160; . Now its time ...
blog.devdave.com
DevDave: November 2012
http://blog.devdave.com/2012_11_01_archive.html
Confessions of a Passionate Developer. Sunday, November 4, 2012. Messing around with Generics. The other day I was looking through some code and thought of a way to refactor the code using generics. I decided to create an example with the code in its current form and then see if I could make it work more generically. All the source can be found here ( https:/ github.com/devdaves/genericconditions. Here is the code example prior to using generics:. 160; . 160; Condition1(request,. First the response ...
blog.devdave.com
DevDave: April 2011
http://blog.devdave.com/2011_04_01_archive.html
Confessions of a Passionate Developer. Friday, April 15, 2011. JavaScript, the revealing module pattern. Lately I have been doing a lot of things with JavaScript and jQuery. After doing some research I found some information on the revealing module pattern. This pattern has really helped me to organize the work I do in JavaScript. I find this to be very easy to read and debug. 160; var. 160; nameTextBox: #nameTextBox. 160; cancelButton: #cancelButton. 160; }. 160; var.
blog.devdave.com
DevDave: March 2014
http://blog.devdave.com/2014_03_01_archive.html
Confessions of a Passionate Developer. Saturday, March 29, 2014. I have been doing a bunch of work with Git lately. I wanted to do a post about some commands I don’t want to forget. Git config - global user.name ' name goes here '. Git config - global user.email ' email address here ’. Turn off https verification. We are using Stash. And its using a self signed certificate. This command allows us to access the Stash repositories over HTTPS. Git config - global http.sslVerify false. Git config - global me...