I have the following entity:
public class User { public int UserId { get; set; } public string UserName { get;
You can do this only with migrations. Set defaultSqlValue parameter for UpdateDate property to "GETDATE()" or "GETUTCDATE()" and when you modify or add new entity you would need to set its value to null.