单列模式(data与business交互)
public class CommentsBusiness //Business { #region 单列模式 private static CommentBusiness instance; private CommentData dal;//Data private CommentsBusiness() { dal=new CommentData(); } public static CommentBusiness GetInstance() { if(instance==null) instance=new CommentBusiness(); return instance; } #endregion }
不忘初心,方得始终