/// <summary> /// 创建数据层接口(DALFactory中定义的) /// </summary> public static IDALClass <T> CreateDALClass <T>(string DbConnectionName) { Type type = typeof(T); var setting = ConfigurationManager.Configuration.GetSection($"ConnectionStrings:{DbConnectionName}"); string assemblyName = "SqlServerDAL"; string typeName = string.Format("{0}.DALClass`1[[{1}]]", assemblyName, type.AssemblyQualifiedName); Console.WriteLine("CreateDALClass:" + typeName); IDALClass <T> objType = (IDALClass <T>)CreateObject(setting, typeName, assemblyName); return(objType); }
public void InitDAL(string DbConnectionName) { dal = DataAccess.CreateDALClass <T>(DbConnectionName); }
public CommandCollection(IDALClass executequerys) { _dalClass = executequerys; }
public Command(IDALClass dalClass) { _dalClass = dalClass; }