I'm finally starting to work with CSLA 3.6 after having used 2.x on my last two projects and have a question about multiple criteria. Maybe I'm just dense today or something, but how do I go about fetching an item or items from the database based on more than one criteria? In 2.x, it was easy enough to overload the method for creating the Criteria object based on the Criteria class embedded inside the business object, but I can't quite seem to get my head around doing the same with CSLA 3.6. It's simple enough to utilize the SingleCriteria class if all I'm interested in is returning an object based on one criteria ... and that handles 80% of my needs ... but how do I go about doing the same if, for instance, I want to return an object based on its ID and whether or not the purchase date falls within a date range? I've looked at the CredentialsCriteria class in Security and am wondering if something similar is the way to go.
tetranz is correct. Nothing has changed in that regard.
I tend to define my criteria outside of the BO so I can re-use them across BOs. But with the new SingleCriteria class I could replace many of mine. (I built them in 1.1 before Generics so there were many of them for a single criteria - 1 for each type - String, Integer, Long, etc.)
Joe
Copyright (c) Marimer LLC