hubertcrab
New Member
Using Entity Framework. I have created an object Registration with a property "AmmountOfChildren" with max set to 50. I want to validate in the setter to make sure that the max ammount is 50. How do i go about it in the best way? \[code\] public global::System.Int16 AmmountOfChildren { get { return _AmmountOfChildren; } set { OnAmmountOfChildrenChanging(value); ReportPropertyChanging("AmmountOfChildren"); _AmmountOfChildren = StructuralObject.SetValidValue(value); ReportPropertyChanged("AmmountOfChildren"); OnAmmountOfChildrenChanged(); } }\[/code\]