当前位置: 代码迷 >> C# >> 单列方式(data与business交互)
  详细解决方案

单列方式(data与business交互)

热度:95   发布时间:2016-05-05 02:47:55.0
单列模式(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}

 

  相关解决方案