public override object GetNewPropValue(ExpectUpdate attr, object obj, PropertyInfo prop) { object newValue = null; if (prop.PropertyType == typeof(int?) || prop.PropertyType == typeof(int?)) { newValue = Convert.ToInt32(RndService.Byte().ToString()); } else { // TODO, as per case newValue = RndService.Byte(); } return(newValue); }