Page 2 of 3

How to use bisect in Git

There’s a method in Git that can become very useful when working in large projects where it is hard to find where bugs originated from. This is the git bisect command and allows you to find by binary search the change that introduced a bug.

Continue reading

Isolating your BLL from your DAL and unit testing it

This article will teach you how to set up a basic service and repository, to isolate your BLL (Business Logic Layer) from your DAL (Data Access Layer), so you can easily create unit tests for your BLL. This solution doesn’t use any ORM (Object Relational Mapping) like e.g. Entity Framework. This is only to explain how to isolate logic from data and how to test your logic in isolation.

Continue reading

How to mock and test WCF services using Moq

I really needed to mock and test WCF services for a new project I’m working on. I had heard great things about the Moq mocking framework so I decided to use that.

Continue reading

Aliases in Git I couldn’t be without

Let’s face it, Git is pretty raw, but it has the options to do cool stuff. That’s why I decided to make a post with the aliases I use all the time and couldn’t be without. Continue reading

How to commit the right way in Git

Most people write commit messages explaining in short what is in their commit, which in the long run tells other people NOTHING about the commit without having to go through the diff of the commit. But there is a better way to do this. Continue reading

.NET Config Transforms and how they are useful

Config Transforms are a nifty method to have your configuration vary, depending on which build configuration you are running or what servers you are publishing to. This gets the most useful when you’re deploying to many kinds of different servers; Development, staging, production, etc.

Continue reading

How I handle changelogs using Git tags

I decided to write about how I handle production changelogs with Git using tags. After bunch of commits to my dev branch and when everything has been tested thouroughly, I merge it to master branch.

Continue reading

Reset IDENTITY field in SQL Server with RESEED

I was trying to reset the IDENTITY value of a table. The problem was I had a foreign key constraint so I couldn’t TRUNCATE the table. That would have solved my problem though.

Continue reading

How to create and publish a NuGet package

NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.

This post will create you how to create and publish your own NuGet package.

Continue reading

Problem with SimpleMembership and Roles

I had a problem with SimpleMembership, Authorize attributes and roles. When I ran my program, I occasionally got the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)

To fix it, I had to go to /Account/LogOff and log in again. Very weird problem. I tried Googling it without any luck, until I stumpled upon this blog post. That saved my day. I decided to write down the method here, in case if his blog went down. For users who stumble upon this problem. Continue reading

© 2017

Theme by Anders NorenUp ↑