using System;
using System.Configuration;
namespace WX.CRM.DataSynClient.Dao
{
public class StoreFactory
{
private static readonly string _dbType = ConfigurationManager.AppSettings["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;
}
}
}