Mocking a LINQ Queryable Repository for TDD

Using ORM frameworks like Entity Framework and NHibernate has become standard practice for many developers. POCO using Entity Framework also supports test-driven-development nicely since we can create tests for our business domain objects without having a dependency on the repository used to store them. Entity Framework also supports LINQ queries which allows us to avoid defining every conceivable query necessary for our application ahead of time, instead letting the code that uses the domain objects construct a […] Read more »

6 Steps To Get Entity Framework 5 Working with MySql 5.5

After much battling with configuration and such I have finally managed to get EF5 Code First and MySql 5 working together using the Oracle/MySql .NET Connector 6.5.4 or the official Connector version 6.6.4. This configuration does not currently support Migrations. The steps are as follows: Grab EF 5 from NuGet Grab MySql.Data and MySql.Data.Entity from NuGet (6.5.4) or MySql (6.6.4) Configure a MySql Data Provider Configure a MySql Connection String Create a Custom MySql Database […] Read more »

Using MySql 5 as Membership Backend for ASP.NET 4.5 MVC 4 Application

Oracle provide MySql ASP.Net web providers through NuGet – search for MySql.Web. Using the MySql providers you can easily use MySql as your membership/profile/role backend for an ASP.Net application. But beware the MySql providers do not currently support the ASP.NET 4.5 templates since those templates use ExtendedMembershipProvider and SimpleMembershipProvider and they have an internal dependency on MS SQL Server… I am going to demonstrate using it as the membership provider for an MVC 4 application […] Read more »

Using NuGet and Git Together

Just had to setup a new project with NuGet packages using Git as source control. In order to set this up properly you need to add #Nuget packages/ to your .gitignore file so that all the binaries, configs and what ever other resources the NuGet packages contain don’t get committed to your repository. This can significantly speed up push and pull requests between repositories with .NET code since you can exclude many megabytes of unnecessary synchronisation and rely […] Read more »

Windows Phone 7 Emulator Running on Parallels

I have previously not managed to get the Windows Phone 7 emulator running on my dev install (Windows 7 on Parallels 7). After upgrading to Parallels 8, installing the latest Parallels update for Windows 8 and the Windows Phone 7.1.1 SDK update. I have managed to get it working a little more. It still takes ages to startup: 2-3 minutes of “Windows Emulator is doing a full OS boot” before the Windows Phone logo shows […] Read more »

Windows Phone 8 Emulator on MacBook Pro – No SLAT

Trying desperately to try out the Windows Phone 8 emulator… I am running a mid 2009 MacBook Pro with a 2.8 GHz Intel Core 2 Duo. The WP8 emulator requires Hyper-V on Windows 8 and Hyper-V requires that the processor supports virtualization through Second Level Address Translation (SLAT). Intel Core i5 &, i7 should support it so a newer MacBook Pro might work, but for me that makes it impossible to run the WP8 emulator […] Read more »

Windows Phone 8 SDK on Mac OSX Parallels 8

Bad news for all us developers who use virtual machines to develop Windows software. The new WP8 emulator is a Hyper-V machine and will only run on non virtualised hosts. So my Mac OSX Parallels 8 dev setup with Windows 8 and Visual Studio 2012  installed in a virtual machine will allow me to install the Windows Phone 8 SDK and all the tools but the phone emulator will not start. As far as I […] Read more »

Windows Phone 8 SDK

Windows Phone 8 was officially released yesterday the 29th and yet the Windows Phone 8 SDK is still not available… Aaargh…. Rumours say that the SDK will be released today at Build 2012 – lets see if they can finally give us all the tools we need! Channel 9 will be streaming sessions at and the keynote, which is usually where all the major announcements are made, is scheduled for 9:00 which translates to 17:00 here in Europe […] Read more »

Automatically Resolving Secondary Assembly References With MSBuild and TFS Build

There is a known issue/feature with MSBuild which also affects TFS build, since it uses MSBuild to compile, where secondary assembly references are not identified and added to csc and vbc tasks. The exact details are explained here, on MSDN and Stackoverflow with various workarounds and on Microsoft Connect. Visual Studio handles the issues automatically by referencing any secondary references that are required, so you don’t see the problem in Visual Studio but may get compile […] Read more »