Category: CodeProject

Database related attributes in Code First

This post is a follow-up on the post about Validation attributes in Code-First. While validation attributes focus on making sure the data in the model is correct, the attributes listed here instead focus on instructing Entity Framework’s database generation engine how the database should be structured. Column Specify what column name to use for this

Validation attributes in Code First

DataAnnotations are really helpful when creating a model in Entity Framework Code-First. They are a simple way of instructing EF how you want the model to be structured and how it should translate the model into a relational database. You can also use validation rules to specify what values are allowed in your parameters. When

8 great features in Visual Studio 2013

In an earlier article I wrote about 10 ways to get more productive in Visual Studio. This is a follow up with new neat things coming with Visual Studio 2013. Open the Resolve menu when typing It happens once in a while that you haven’t included the namespace you need at the top of your

Remote desktop connection to Ubuntu VM in the Azure cloud using an SSH tunnel

This is the second post in the serie on how to install and configure an Ubuntu VM running in the Azure Cloud. The first post described how to setup an Ubuntu VM in Azure and connect through SSH. This post describes how to setup a graphical user interface and connect to it through an encrypted

Installing Ubuntu VM in Azure

Quite a few times I’ve been asked how to install and configure Ubuntu machines in the Azure cloud. Over a short serie of posts I’ll go through some simple steps of how to do it in a secure manner. Generate certificate for authentication There are different ways of authenticating when you’re connecting to your VM.

Enum support in PHP

As any PHP developer knows, there is no native enum support in PHP due to the fact that PHP is a dynamic language where a variable can be anything and everything. Many have tried to implement their own version of enum support, some solutions working better than others. Here, I’ll give you my version of


Group concatenation in T-SQL using CTE

In Oracle you have listagg() and in MySQL you have group_concat() to create string aggregations. But what do you have in T-SQL? The simple answer is nothing, yet, and we’re all hoping for a change in the future. But until then it’s up to us to do it by hand. In a previous post I

How to use recursive CTE calls in T-SQL

A common table expression (CTE) in T-SQL is used by many to get around the internal referencing problem in derived tables. It also gives you a better overview of your query compared to having nested derived tables. But one really nice feature with CTEs is that you can let it call itself recursively and nest

10 ways to get more productive in Visual Studio

Visual Studio is full of shortcuts and handy tools helping you, as a programmer, to be more efficient in your work. Today I’m sharing a few of my favourite ones. All examples given here are tested in Visual Studio 2012. Open search result in a list Press CTRL + F to open the search pane.

Configure Eclipse to use Team Foundation Service with Git

This is the second post in how to setup TFS and Eclipse to use git. Before you continue here make sure you’ve setup TFS properly as described here. I also assume here that you’ve already installed egit as a plugin in Eclipse. Create a new local project in Eclipse (File / New / Local PHP

%d bloggers like this: