Posts

Adventure Works Databases for Sql Server

 Microsoft released a sample database which can be used to explore and practice using the various features of Sql Server. Adventure Works is a fictitious, multinational bicycle manufacturing company. The database is an enterprise solution which covers Sales/Marketing, Product, Purchasing/Vendor and Manufacturing scenarios.

Getting started with EntityFrameworkCore

Image
I while ago, I posted about setting up Entity Framework 6 Code First migrations in an MVC 5 Project. These days, its all about dotnet core, and whilst the process is very similar, I thought I would write another detailed walk through so that I can hit the ground running when I'm required to do this working on real projects.

Generating C# Clients using Swagger and Autorest

Autorest is a great tool for automating the creation of clients from Swagger or Open Api definition files. The resulting code can be dropped into a project and shareable client code can be distributed.

Understanding the C# Linq SelectMany Operator

The Linq operator SelectMany has always confused me a bit, and yesterday I came across it in some code so had to actually try to understand it.

Turning on internal logging for log4net

Image
Turning on internal logging for log4net is straight forward and provides a detailed information about the many issues that may occur.

Setting up Powershell console profile

Image
In my previous post I talked about setting up vim plugins. I've been using vim on the commandline quite a bit now and have found a couple of useful commands that I like to have setup to make use a bit easier.

Setting up Vim Plugins on Windows

Image
I've been using VsVim the vim Visual Studio plugin and I really like how much easier it makes coding when your fingers can live on the home keys more. Recently I started working through Roy Osheroves Vim Hates You course and learning loads more tricks and ways to use vim, so I thought I would put a bit of effort into learning vim int the console so that it might in the future it might become my main weapon of choice.

Setting up a Selenium/Specflow Acceptance Test Project

I really appreciate the value in using Selenium and Specflow to write a suite of browser based tests to validate a software application. These tests unequivocally confirm that the acceptance criteria is met and the application functions as desired. I wrote a post about a nice way to think of these Acceptance Tests as three different layers for the features calling into the steps and the steps using the page objects, but its not really a good walk though for actually setting up the project... so here goes....!

Creating Custom Powershell libraries

Image
Powershell is a very powerful tool for automating tasks. Creating your own nuget repository that hosts powershell modules is a great way to distrubute powershell scripts, but it can be a bit fiddly to setup.

Uninstalling Visual Studio using MS Total Uninstall

Uninstalling Visual Studio can be a real challenge, and my old PC at home is full with versions 2012/13/15. After a brief bit of googling I found a very useful tool which seemed to do the job and freed up 20gb of space on my machine.

Scripting the Installation of Powershell 4.0

Image
I got a bit fed up with upgrading PowerShell on a number of different servers so decided to write a script to automate the task. I appreciate that it doesn’t take long to click download and install but after using chocolatey you start to realise how easy it can actually be with a little bit of effort.

Parsing Visual Studio Files with Powershell

Image
Most companies have some pretty complicated legacy code bases with a multitude of applications and shared libraries. It can be quite difficult to see how the solutions and projects fit together. With the push towards devops and microservices it’s nice if we can carry some of the legacy applications along too. I’ve found PowerShell a useful way to try to reason about a code base...

Using Markdown in ASP.NET

Recently I was tasked with adding some CMS style functionality to a customers site. Rather than reinvent the wheel by doing my own pattern matching etc, I decided to use some markdown to do the hard work. I naively thought that it would be easier to implement because the markdown library would take care of key security concerns. Little did I realise...

Adding ASP.NET Identity 4.5 to an Existing Application

Watching videos about putting ASP.NET websites together, it always looks really nice and straight forward, it demos really well. Back at the office, faced with some real world requirements things never seem that simple. To this end I decided to try to setup the Identity framework from scratch on an existing web application.

Visual Studio 2013 WIF 3.5 STS Template

The Windows Identity Foundation (WIF) 3.5 provided some Visual Studio templates to create a Secure Token Service (STS.) Unfortunately these were not available in Visual Studio 2013 and also, they actually created a Web Site rather than a Web Application.

Clicked checkbox does not post back to the server

Recently I got a bit stuck trying to do the simple task of set some values on a checkbox. The form was quite complex and I was finding that checking a checkbox to signify a "FollowUp" had occurred was not being posted back to the server. It took quite a bit of fiddling around before I got to the bottom of the problem so thought I would record the solution...

JavaScript Property Descriptors

In a previous post, I mentioned how a JavaScript object can be thought of simply as a collection of properties. But a property in JavaScript is more than just a value - property’s themselves have… well properties.

Creating objects in JavaScript

I've been messing around with JavaScript for years now, but have been more of a JQuery hacker. I thought it was time to learn the language properly as its becoming increasingly common in web applications these days. This is a bit of a dummies guide, but I guess you need to start somewhere...

Setting up Rhino Mock Stubs

A quick template below for the basic setup of Rhino Mocks Stubs...

Shrinking log files on SQL Server 2008 R2

You know your having a bad day when you have to logon to a server to start running SHRINKFILE commands to free up disk space. Recently our Team City builds will start failing because an application API is down and when we track that through, we find that a Sql Server has run out of disk space. Doh!