I'm using LLBLGen 5.0 and EntityCollectionBase.GetMulti(filter, relation) to retrieve objects in oracle database.
ObjectCollection objects = new ObjectCollection ();
RelationCollection relationsToUse = new RelationCollection();
relationsToUse.Add(ObjectEntity.Relations.Object2EntityUsingObject2Id);
IPredicateExpression filter = new PredicateExpression(ObjectFields.Code == sectionCode);
objects.GetMulti(filter, relationsToUse);
I would like to add caching system to avoid to do request in database many times. I saw on LLBLGen documentation that it is possible to use cache on LLBLGen with this code:
var customers = new EntityCollection<CustomerEntity>();
using(var adapter = new DataAccessAdapter())
{
var parameters = new QueryParameters()
{
CollectionToFetch = customers,
FilterToUse = CustomerFields.Country=="USA",
CacheResultset = true,
CacheDuration = new TimeSpan(0, 0, 10) // cache for 10 seconds
};
adapter.FetchEntityCollection(parameters);
}
But I'm not able to found class DataAccessAdapter..
Do you have any idea, suggestion to resolve my issue ?
Thanks in advance,