Question about "SingleCriteria" in Csla 4

Question about "SingleCriteria" in Csla 4

Old forum URL: forums.lhotka.net/forums/t/9295.aspx


Jav posted on Thursday, July 29, 2010

Reading the Change Log, I got the impression that one can pass parameters to DataPortal.xyz methods like we do to any other method.  I tried testing that in a few situations (Client and Server partial classes).  In one I got a compile error, in the other a runtime error.  I made the assumption that I must have read something wrong, and decided to let things be.

But I thought I should report this in case there is actually a problem.

Jav

 

RockfordLhotka replied on Thursday, July 29, 2010

You can pass any single serializable value as a parameter to Create, Fetch or Delete. So SingleCriteria is now useless, since you can just pass a single value.

If you need to pass more than one value then you'll need to implement a serializable object (in SL the minimum is to implement IMobileObject or subclass MobileObject).

tiago replied on Monday, August 02, 2010

Hi Rocky,

RockfordLhotka

You can pass any single serializable value as a parameter to Create, Fetch or Delete. So SingleCriteria is now useless, since you can just pass a single value.

I've been here before. From the previous thread I understood SingleCriteria is needed when you need to pass a non serializable parameter, like a non native type (I won't discuss this scenario). Otherwise it would be useless and could/should be deprecated.

Regards

Copyright (c) Marimer LLC