Faking DbContext in Entity Framework 4.1 with a generic repository

No Comments

Update 30/11/2011: FakeDbSet implementation update Please see the new and improved FakeDbSet Here Update 16/06/2011: ¬†Added step (2) description of how to implement Set<>() method in your original DbContext so that it returns IDbSet<>. Also added SaveChanges() to expose the context as a unit…

Javascript parseInt gotcha (All browsers)

No Comments

I wanted to keep this blog to put up interesting gotchas that I've found whilst programming. This is definitely one of the craziest I've seen. I had a problem with my jquery calendar where I was parsing a string as an int. I was calling this: parseInt("08"); So you…

Jquery AJAX call to WCF Service returning custom objects

No Comments

As the web gets faster and ajax becomes more and more used you will find clients are expecting a web experience close to that of a desktop application. JQuery together with Ajax make this task a whole lot easier. I'm currently writing a control to make room bookings via calender…

Jquery Visual Studio 2010 Intellisense in Javascript(JS) file

No Comments

Hey guys, Just a little trick I came along today, If you're after Jquery Intellisense in your js file your going to need the jquery-x.x.x-vsdoc.js file which comes with the jquery package. Simply add this to the top of your JS file /// <reference path="jquery-x.x…

Silverlight WCF RIA Services DTO for light weight entities + filter relational child entity collections

No Comments

WCF RIA servies has great support for Linq and Entity Framework. But if you have a large domain model and would like to send a slightly different view of the entities (for example merge some normalised entities into one conceptual entity, or only send a subset of fields, or only…

Silverlight: Deploying Silverlight on IIS 6 (Mime Types)

No Comments

Deploying Silverlight is relatively easy, there are a few things which can be annoyances especially when using ria services as noted in my post http://refactorthis.wordpress.com/2010/11/23/deploying-silverlight-wcf-ria-services-on-iis-6/ To allow IIS to serve Silverlight content you will want to create a virtual directory containing your silverlight…