User-1422983141 posted
In my Model:
[DataType(DataType.DateTime)]
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
[Display(Name = "Expiry Date", Description = "Expiry Date if Applicable.", Prompt = "Expiry Date", ShortName = "Expiry", Order = 1)]
public DateTime ExpiryDate { get; set; }
ApplicationDbContext creates the Table Definition for me and the field for ExpiryDate is created and set too, Not Null.
ExpiryDate (datetime2(7),not null)
I would like the table field to be set to null as this value may or may not be relevant to a entry.
I would like to change the model annatations and have it flow through?