王帅磊  

using System.Reflection;
using System.Configuration;

 

static string path = ConfigurationManager.AppSettings["dal"];//"DAL";
public T create<T>(string typeName)
{
return (T)Assembly.Load(path).CreateInstance(path + typeName);
}

 

return factory.create<daladd>(".daladd").add(model);

 

<appSettings>

<add key="dal" value="DAL"/>
</appSettings>

posted on 2018-11-22 18:16  程序圆吧  阅读(102)  评论(0编辑  收藏  举报