When both update-database and add-migrations fail while referring to each other

Today I checked out a project from Git on a new machine. The project was using Entity Framework to connect to a local SQL Server on my developer machine. To install the database I ran update-database in the Package Manager Console and got an error message complaining about “pending changes” and that I should run




How to handle browser redirections in PHP and preventing loops

When programming web applications it happens that I need to redirect a user from one url to another. One example is when the user has made a payment and is redirected back from the payment provider’s portal to my summary page. In that situation I don’t want the user to stay on that page with




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


Tags:


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




Data type overview in phpDocumentor

Why is it good to create documentation? Especially if you’re the only coder in the project! You always have this issue of what happens when someone else is going to take over your code in the future. But besides that, if you have a smart IDE you can get a lot of extra help in




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.




%d bloggers like this: