Define common Csla Factory Methods Rockford Lhotka Defines common Csla-style factory methods. cslafact
ClassName String Replace with class name. BusinessClass CriteriaClassName String Replace with the Criteria class name. Criteria IdName String Replace with Id (primary key) variable name. id IdType Replace with the Id (primary key) variable type. int (); } public static $ClassName$ Get$ClassName$($IdType$ $IdName$) { return DataPortal.Fetch<$ClassName$>(new $CriteriaClassName$($IdName$)); } public static void Delete$ClassName$($IdType$ $IdName$) { DataPortal.Delete(new $CriteriaClassName$($IdName$)); } private $ClassName$() { /* Require use of factory methods */ } #endregion]]>