CSLA .NET
From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books
Sign in
|
Join
|
Help
Home
Forums
Store
FAQ
Forums
»
CSLA .NET Community Contributions
»
CslaContrib
»
Cached lists
CSLA .NET Resources:
CSLA .NET home page
What is CSLA .NET?
Download CSLA .NET
CSLAcontrib project
Code generation index
Cached lists
rated by 0 users
This post has 0 Replies | 1 Follower
Posts
5
Reply
eDjinn
Posted: Thu, Sep 13 2007 9:13 AM
rated by 0 users
Using the Codesmith templates (based CSLA2.x CS 1.1.0 RC), I like the choice I have generating a single, SplitPartial of SplitBase class.
What we use a lot in our code, is static lists (that is: lists that don't change a lot, like storage places in a a warehouse.
Maybe I can suggest a change here in the templates:
ReadOnlyRootList and ObjectFactoryMethods:
private static _cachedList = null;
public static (bool useCache 0) { %>, )
(...)
if (_cachedList == null || !useCache)
_cachedList = DataPortal.Fetch>(new FilterCriteria());
return _cachedList;
EditableRootList:
protected override void DataPortal_Update()
(...)
_cachedList = null;
RaiseListChangedEvents = true;
Using these changes, most lists will be cachable by choise.
Any comments?
Previous
|
Next
Page 1 of 1 (1 items) |
RSS
Please contact
Magenic
for your .NET consulting
and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.
Why donate?
Copyright (c) 2006-2010
Marimer LLC
. All rights reserved.
Email admin@lhotka.net for support.