I get the following exception when running the code below.
System.ArgumentException: \'Property \'System.DateTime DateValidFrom\' is not defined for type