Skip to content

Commit

Permalink
更新项目版本号为1.1.0.2;
Browse files Browse the repository at this point in the history
  • Loading branch information
zqlovejyc committed May 15, 2019
1 parent f22926d commit d2cd60b
Show file tree
Hide file tree
Showing 28 changed files with 48 additions and 151 deletions.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.0.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.1.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.2.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.3.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.4.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.5.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.6.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.7.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.8.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.6.9.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.0.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.1.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.2.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.3.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.4.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.5.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.6.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.7.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.8.nupkg
Binary file not shown.
Binary file removed SQLBuilder/Nuget/Zq.SQLBuilder.1.0.7.9.nupkg
Binary file not shown.
4 changes: 2 additions & 2 deletions SQLBuilder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.1")]
[assembly: AssemblyFileVersion("1.1.0.1")]
[assembly: AssemblyVersion("1.1.0.2")]
[assembly: AssemblyFileVersion("1.1.0.2")]
5 changes: 0 additions & 5 deletions SQLBuilder/Repositories/IRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public interface IRepository : IDisposable
/// </summary>
string ConnectionString { get; set; }

/// <summary>
/// 数据库连接对象
/// </summary>
DbConnection Connection { get; set; }

/// <summary>
/// 事务对象
/// </summary>
Expand Down
31 changes: 9 additions & 22 deletions SQLBuilder/Repositories/MySqlRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class MySqlRepository : IRepository
{
#region Field
/// <summary>
/// 私有数据库连接对象
/// 事务数据库连接对象
/// </summary>
private DbConnection _dbConnection;
#endregion
Expand All @@ -65,22 +65,10 @@ public DbConnection Connection
{
get
{
if (_dbConnection == null)
{
_dbConnection = new MySqlConnection(ConnectionString);
if (_dbConnection.State != ConnectionState.Open)
_dbConnection.Open();
}
//判断DbConnection被using后连接字符串是否被置为空
else if (_dbConnection.ConnectionString.IsNullOrEmpty())
{
_dbConnection.ConnectionString = ConnectionString;
}
return _dbConnection;
}
set
{
_dbConnection = value;
var dbConnection = new MySqlConnection(ConnectionString);
if (dbConnection.State != ConnectionState.Open)
dbConnection.Open();
return dbConnection;
}
}

Expand Down Expand Up @@ -113,9 +101,8 @@ public MySqlRepository(string connString)
/// <returns>IRepository</returns>
public IRepository BeginTrans()
{
if (Connection.State != ConnectionState.Open)
Connection.Open();
Transaction = Connection.BeginTransaction();
_dbConnection = Connection;
Transaction = _dbConnection.BeginTransaction();
return this;
}

Expand Down Expand Up @@ -144,8 +131,8 @@ public void Rollback()
/// </summary>
public void Close()
{
if (Connection.State != ConnectionState.Closed)
Connection.Close();
_dbConnection?.Close();
_dbConnection?.Dispose();
Transaction = null;
}
#endregion
Expand Down
31 changes: 9 additions & 22 deletions SQLBuilder/Repositories/NpgsqlRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class NpgsqlRepository : IRepository
{
#region Field
/// <summary>
/// 私有数据库连接对象
/// 事务数据库连接对象
/// </summary>
private DbConnection _dbConnection;
#endregion
Expand All @@ -65,22 +65,10 @@ public DbConnection Connection
{
get
{
if (_dbConnection == null)
{
_dbConnection = new NpgsqlConnection(ConnectionString);
if (_dbConnection.State != ConnectionState.Open)
_dbConnection.Open();
}
//判断DbConnection被using后连接字符串是否被置为空
else if (_dbConnection.ConnectionString.IsNullOrEmpty())
{
_dbConnection.ConnectionString = ConnectionString;
}
return _dbConnection;
}
set
{
_dbConnection = value;
var dbConnection = new NpgsqlConnection(ConnectionString);
if (dbConnection.State != ConnectionState.Open)
dbConnection.Open();
return dbConnection;
}
}

Expand Down Expand Up @@ -113,9 +101,8 @@ public NpgsqlRepository(string connString)
/// <returns>IRepository</returns>
public IRepository BeginTrans()
{
if (Connection.State != ConnectionState.Open)
Connection.Open();
Transaction = Connection.BeginTransaction();
_dbConnection = Connection;
Transaction = _dbConnection.BeginTransaction();
return this;
}

Expand Down Expand Up @@ -144,8 +131,8 @@ public void Rollback()
/// </summary>
public void Close()
{
if (Connection.State != ConnectionState.Closed)
Connection.Close();
_dbConnection?.Close();
_dbConnection?.Dispose();
Transaction = null;
}
#endregion
Expand Down
31 changes: 9 additions & 22 deletions SQLBuilder/Repositories/OracleRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class OracleRepository : IRepository
{
#region Field
/// <summary>
/// 私有数据库连接对象
/// 事务数据库连接对象
/// </summary>
private DbConnection _dbConnection;
#endregion
Expand All @@ -65,22 +65,10 @@ public DbConnection Connection
{
get
{
if (_dbConnection == null)
{
_dbConnection = new OracleConnection(ConnectionString);
if (_dbConnection.State != ConnectionState.Open)
_dbConnection.Open();
}
//判断DbConnection被using后连接字符串是否被置为空
else if (_dbConnection.ConnectionString.IsNullOrEmpty())
{
_dbConnection.ConnectionString = ConnectionString;
}
return _dbConnection;
}
set
{
_dbConnection = value;
var dbConnection = new OracleConnection(ConnectionString);
if (dbConnection.State != ConnectionState.Open)
dbConnection.Open();
return dbConnection;
}
}

Expand Down Expand Up @@ -113,9 +101,8 @@ public OracleRepository(string connString)
/// <returns>IRepository</returns>
public IRepository BeginTrans()
{
if (Connection.State != ConnectionState.Open)
Connection.Open();
Transaction = Connection.BeginTransaction();
_dbConnection = Connection;
Transaction = _dbConnection.BeginTransaction();
return this;
}

Expand Down Expand Up @@ -144,8 +131,8 @@ public void Rollback()
/// </summary>
public void Close()
{
if (Connection.State != ConnectionState.Closed)
Connection.Close();
_dbConnection?.Close();
_dbConnection?.Dispose();
Transaction = null;
}
#endregion
Expand Down
31 changes: 9 additions & 22 deletions SQLBuilder/Repositories/SqlRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class SqlRepository : IRepository
{
#region Field
/// <summary>
/// 私有数据库连接对象
/// 事务数据库连接对象
/// </summary>
private DbConnection _dbConnection;
#endregion
Expand All @@ -65,22 +65,10 @@ public DbConnection Connection
{
get
{
if (_dbConnection == null)
{
_dbConnection = new SqlConnection(ConnectionString);
if (_dbConnection.State != ConnectionState.Open)
_dbConnection.Open();
}
//判断DbConnection被using后连接字符串是否被置为空
else if (_dbConnection.ConnectionString.IsNullOrEmpty())
{
_dbConnection.ConnectionString = ConnectionString;
}
return _dbConnection;
}
set
{
_dbConnection = value;
var dbConnection = new SqlConnection(ConnectionString);
if (dbConnection.State != ConnectionState.Open)
dbConnection.Open();
return dbConnection;
}
}

Expand Down Expand Up @@ -113,9 +101,8 @@ public SqlRepository(string connString)
/// <returns>IRepository</returns>
public IRepository BeginTrans()
{
if (Connection.State != ConnectionState.Open)
Connection.Open();
Transaction = Connection.BeginTransaction();
_dbConnection = Connection;
Transaction = _dbConnection.BeginTransaction();
return this;
}

Expand Down Expand Up @@ -144,8 +131,8 @@ public void Rollback()
/// </summary>
public void Close()
{
if (Connection.State != ConnectionState.Closed)
Connection.Close();
_dbConnection?.Close();
_dbConnection?.Dispose();
Transaction = null;
}
#endregion
Expand Down
45 changes: 9 additions & 36 deletions SQLBuilder/Repositories/SqliteRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class SqliteRepository : IRepository
{
#region Field
/// <summary>
/// 私有数据库连接对象
/// 事务数据库连接对象
/// </summary>
private DbConnection _dbConnection;
#endregion
Expand All @@ -65,36 +65,10 @@ public DbConnection Connection
{
get
{
if (_dbConnection == null)
{
_dbConnection = new SQLiteConnection(ConnectionString);
if (_dbConnection.State != ConnectionState.Open)
_dbConnection.Open();
}
else
{
try
{
/***
* 判断DbConnection被using后连接字符串是否被置为空
* 注意:Framework版本Sqlite数据库连接对象using后无法再次访问,否则抛出无法访问已释放的对象异常,.Net Core版本Sqlite则可以正常访问。
*/
if (_dbConnection.ConnectionString.IsNullOrEmpty())
_dbConnection.ConnectionString = ConnectionString;
}
catch
{
//重新创建数据库连接对象
_dbConnection = new SQLiteConnection(ConnectionString);
if (_dbConnection.State != ConnectionState.Open)
_dbConnection.Open();
}
}
return _dbConnection;
}
set
{
_dbConnection = value;
var dbConnection = new SQLiteConnection(ConnectionString);
if (dbConnection.State != ConnectionState.Open)
dbConnection.Open();
return dbConnection;
}
}

Expand Down Expand Up @@ -127,9 +101,8 @@ public SqliteRepository(string connString)
/// <returns>IRepository</returns>
public IRepository BeginTrans()
{
if (Connection.State != ConnectionState.Open)
Connection.Open();
Transaction = Connection.BeginTransaction();
_dbConnection = Connection;
Transaction = _dbConnection.BeginTransaction();
return this;
}

Expand Down Expand Up @@ -158,8 +131,8 @@ public void Rollback()
/// </summary>
public void Close()
{
if (Connection.State != ConnectionState.Closed)
Connection.Close();
_dbConnection?.Close();
_dbConnection?.Dispose();
Transaction = null;
}
#endregion
Expand Down
21 changes: 1 addition & 20 deletions SQLBuilder/SQLBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,6 @@
<ItemGroup />
<ItemGroup>
<None Include="app.config" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.0.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.1.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.2.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.3.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.4.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.5.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.6.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.7.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.8.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.6.9.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.0.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.1.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.2.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.3.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.4.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.5.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.6.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.7.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.8.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.7.9.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.8.0.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.8.1.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.0.8.2.nupkg" />
Expand All @@ -144,6 +124,7 @@
<None Include="Nuget\Zq.SQLBuilder.1.0.9.9.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.1.0.0.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.1.0.1.nupkg" />
<None Include="Nuget\Zq.SQLBuilder.1.1.0.2.nupkg" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down

0 comments on commit d2cd60b

Please sign in to comment.