I have the following model . How can I store the datetime value which are stored in the column MOTDate , TaxDate into the column MOTDateString, TaxDateString automatically.
public class Vehicles { public DateTime? MOTDate { get; set; } public DateTime? TaxDate { get; set; } public DateTime? RegDate { get; set; } public DateTime? InsuredDate { get; set; } [NotMapped] public string MOTDateString {get;set;} [NotMapped] public string TaxDateString { get; set; } }