With EF 5.0.0, VS 2012 and .NET 4.5, when I add a new ADO.NET Entity Data Model from an existing SQL Server 2012 database, the generated code does not differentiate between a nullable and non-nullable varchar. For e.g. TTITLE is non-nullable but CITY is nullable in my database, but they end up like following in the generated code - which in turn creates validation issue. Shouldn't TITLE property be decorated by [Required]
attribute by EF by default? It does generated differentiates accurately between nullable and non-nullable int.
public partial class AWARD
{
public int ID { get; set; }
public int PERSON_ID { get; set; }
public string TITLE { get; set; }
public string CITY { get; set; }
public Nullable<int> STATE_PROVINCE { get; set; }
public Nullable<int> COUNTRY { get; set; }
public string ORGANIZATION { get; set; }
public int YEAR { get; set; }
public Nullable<int> MONTH { get; set; }
public virtual PERSON PERSON { get; set; }
public virtual V_COUNTRY V_COUNTRY { get; set; }
public virtual V_USA_STATE V_USA_STATE { get; set; }
}