I am new to csla Validation and got a problem to resolve on Validation rules.
The scenario is that I am trying to update a Collection on client on the basis of response from Server.
The Class in which the "notsupported exception" comes is derived from "csla BusinessBase".
While setting a property we have HAsPropertyChanged()
method on which an error as insert is an invalid operation and Remove is an Invalid Operation comes.
The Stack Trace is as
at Csla.Core.ReadOnlyBindingList1.InsertItem(Int32 index, C item)
at System.Collections.ObjectModel.Collection
1.Add(T item)
at Csla.Validation.BrokenRulesCollection.Add(IRuleMethod rule)
at Csla.Validation.ValidationRules.CheckRules(List`1 list)
at Csla.Validation.ValidationRules.CheckRules(String propertyName)
at Csla.Core.BusinessBase.PropertyHasChanged(String propertyName)
The scenario is not known exactly as for some processes it work and for some response it cannot execute HasPropertyChanged although the value being the same in both cases.
I am not sure of where to implement that method and how.
Could you please provide your valuable suggestions.