Posts

Showing posts from February, 2015

Entity Framework Code First to an Existing Database

Image
Recently I had a need to create an entity model from an existing database so started adding an edmx as I had done so many times before in this scenario. Then I remembered reading on the Entity Framework documentation website that its actually possible to reverse engineer a code first model .

Writing Acceptance Tests using SpecFlow & Selenium

Selenium and SpecFlow are pretty straight forward to get to grips with individually, but on larger projects when the page object pattern is used things start to get a little more complicated. I find it useful to think about three layers when organizing the code that runs the tests...

Getting Started with Entity Framework Code First

Image
The documentation  for the Entity Framework provides thorough introduction, in this post I start with the basic tutorial for code first with a view to setting up an application I can use to practice some technologies and techniques on in the future.

MVC Unit Testing Asserts with Rhino Mocks

When I first started learning to use mocking frameworks I was lucky enough to start on Moq which was nice and simple. Whenever I needed to know something there was one single google code page which told everything. Nice! Rhino Mock by example I find hard work, so I put this cheat sheet together to help get up and running quickly.

ASP.NET MVC Standard Application Architecture

Image
At work we have started moving towards a standard .NET application architecture for most of our apps.  This uses MVC 5 website with a REST client talking to a Web API 5. When you open a visual studio solution, as a minimum you see the following projects...

ASP.NET MVC Uploading and Downloading Files

Uploading files is pretty straight forward with ASP.NET MVC 5, but there are few things to be aware of to make things go a bit smoother.

Mocking the Controller Context using Rhino Mock

When using ASP.NET MVC 5, its easy to write unit tests around the framework due to the various abstractions provided.