Listener Design Pattern

Listener design pattern (also known as Subscriber/Observer) is a 'well-proven' technique for asynchronous message passing. It is used when the client needs to be notified when 'something interesting' happens to another object (of class X) in a passive manner (i.e. the client is not checking every so often (pulling) in the state has changed). The...

Introduction

Engineers are lazy. Design Patters are a way of reusing some well proven techniques to solve problems. The are sort of templates for solving problems but not complete solutions. There are 4 key types of design patters: Creational Structural Behavioral Concurrency In this category, I will share some of my experience in the area of...

Column '' in table '' is of a type that is invalid for use as a key column in an index.

I've tried to create a simple (unique) constraint across multiple columns:

However I was greeted by: Column 'Name' in table 'dbo.UserLocations' is of a type that is invalid for use as a key column in an index. This can be fixed by adding: [DataType("VARCHAR")] and [MaxLength(40)] on the string. The point is that MaxLength...