ReadOnlyBase Question

ReadOnlyBase Question

Old forum URL:

RangerGuy posted on Monday, June 16, 2008

Why is Dataport.Fetch(new criteria(_ID)) not supported for a ReadOnlyBase object?

I"m getting this error

DataPortal.Fetch failed (System.NotSupportedException: Invalid operation - fetch not allowed\r\n   at Csla.ReadOnlyBase`1.DataPortal_Fetch(Object criteria) in C:\\csla20cs\\csla20cs\\Csla\\ReadOnlyBase.cs:line 349)


This is the method that raising the exception

protected virtual void DataPortal_Fetch(object criteria)


throw new NotSupportedException(Resources.FetchNotSupportedException);


What I don't under stand is way is this method doing this? You should be able to pull a stand alone readonly object shouldn't you ?

RockfordLhotka replied on Monday, June 16, 2008

You have to either override that method or provide an overload that has a better match for the criteria parameter. It should work exactly like it does for a BusinessBase object.

RangerGuy replied on Tuesday, June 17, 2008

That worked, I should have known that LOL!


Copyright (c) Marimer LLC