using System;
namespace WX.CRM.DataSynApi.Dao
{
///
///
///
public class StoreFactory
{
private static readonly string _dbType = WX.CRM.Common.Utility.GetSettingOrNullByKey("DatabaseType");
///
///
///
///
public IStore GetStore()
{
if (string.IsNullOrEmpty(_dbType))
throw new Exception("数据库类型配置错误!");
IStore store = null;
switch (_dbType)
{
case "ORACLE":
store = new OracleStore();
break;
case "MYSQL":
store = new MySqlStore();
break;
}
return store;
}
}
}