public static Class GetClassBLLInstance() { //如实例不存在,则New一个新实例,否则返回已有实例 if (ClassBLLInstance == null) { lock (syncRootClass) { if (ClassBLLInstance == null) ClassBLLInstance = new Class(); } } return ClassBLLInstance; }
public static string GetClassName(int id) { var bll = new Class(); return bll.GetModel(id).Name; }