I\'m using Entity Framework 6.1 code-first and my domain model is below.
class Item { [Index] public string CreatedBy { set; get; } }
Usually you get this error when you use a VARCHAR(Max) try using:
[Column(TypeName = "VARCHAR")] [StringLength(n)] [Index] public string CreatedBy { set; get; }
where n is between 1 and 450.