public static College GetCollegeBLLInstance() { //如实例不存在,则New一个新实例,否则返回已有实例 if (CollegeBLLInstance == null) { lock (syncRootCollege) { if (CollegeBLLInstance == null) CollegeBLLInstance = new College(); } } return CollegeBLLInstance; }
public static string GetCollegeName(int id) { var bll = new College(); return bll.GetModel(id).Name; }