Entity Framework Migrations Error – Sequence contains no elements

This problem occurs to me when a try to define type and size of a column with DataAnnotations.

BAD:

[Column(TypeName="VARCHAR(254)")]
public string ColumnName { get; set; }

OK:

[MaxLength(254)]
[Column(TypeName="VARCHAR")]
public string ColumnName { get; set; }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)