Ejemplo n.º 1
0
 /// <summary>
 /// 数据库脚本执行控制器
 /// </summary>
 /// <param name="databaseConnector">数据库连接器。</param>
 public MySQLExecutor(DatabaseConnector databaseConnector)
     : base(new DatabaseConnector()
     {
         connectionString = databaseConnector.connectionString,
         commandTimeout = databaseConnector.commandTimeout,
         databaseType = databaseConnector.databaseType,
         isolationLevel = databaseConnector.isolationLevel,
         metadata = "metadata=res://*/Metadata.DatabaseModel.csdl|res://*/Metadata.DatabaseModel.ssdl|res://*/Metadata.DatabaseModel.msl;provider=MySql.Data.MySqlClient;provider connection string=\"" + databaseConnector.connectionString + "\""
     })
 {
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 数据库实体
 /// </summary>
 /// <param name="databaseConnector">数据库连接器</param>
 public DatabaseEntities(DatabaseConnector databaseConnector)
     : base(databaseConnector.metadata)
 {
     ((System.Data.Entity.Infrastructure.IObjectContextAdapter)this).ObjectContext.CommandTimeout = databaseConnector.commandTimeout;
 }