[ModelMetadataType(typeof(ITemporalData))]
public partial class Person : ITemporalData
{
}
public partial class Person
{
public DateTime SysStartDate { get; set; }
public DateTime SysEndDate { get; set; }
}
public interface ITemporalData
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
DateTime SysStartDate { get; set; }
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
DateTime SysEndDate { get; set; }
}
Here is example of sample code.
ModelMetadataType has no effect (DatabaseGenerated data annotation doesn't added to the appropriate properties). Am I doing something wrong?