Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
b181fbd85a
  1. BIN
      .vs/SqlSugar/v14/.suo
  2. 1
      OrmTest/Program.cs
  3. BIN
      OrmTest/bin/Debug/Newtonsoft.Json.dll
  4. BIN
      OrmTest/bin/Debug/OrmTest.exe
  5. 6
      OrmTest/bin/Debug/OrmTest.exe.config
  6. BIN
      OrmTest/bin/Debug/OrmTest.pdb
  7. BIN
      OrmTest/bin/Debug/SqlSugar.dll
  8. BIN
      OrmTest/bin/Debug/SqlSugar.pdb
  9. BIN
      OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache
  10. BIN
      OrmTest/obj/Debug/OrmTest.exe
  11. BIN
      OrmTest/obj/Debug/OrmTest.pdb
  12. 3
      SqlSugar/Abstract/DbProvider/DbProvider.cs
  13. 16
      SqlSugar/Databases/SqlServer/Db/SqlServerDb.cs
  14. 2
      SqlSugar/Interface/IDb.cs
  15. 2
      SqlSugar/SqlSugar.csproj.user
  16. BIN
      SqlSugar/bin/Debug/SqlSugar.dll
  17. BIN
      SqlSugar/bin/Debug/SqlSugar.pdb
  18. BIN
      SqlSugar/obj/Debug/SqlSugar.dll
  19. BIN
      SqlSugar/obj/Debug/SqlSugar.pdb

BIN
.vs/SqlSugar/v14/.suo

Binary file not shown.

1
OrmTest/Program.cs

@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.Linq.Expressions;
using SqlSugar;
using OrmTest.Models;
using System.Data.SqlClient;
namespace OrmTest
{

BIN
OrmTest/bin/Debug/Newtonsoft.Json.dll

Binary file not shown.

BIN
OrmTest/bin/Debug/OrmTest.exe

Binary file not shown.

6
OrmTest/bin/Debug/OrmTest.exe.config

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

BIN
OrmTest/bin/Debug/OrmTest.pdb

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.pdb

Binary file not shown.

3
SqlSugar/Abstract/DbProvider/DbProvider.cs

@ -18,7 +18,6 @@ namespace SqlSugar
this.IsClearParameters = true;
this.CommandTimeOut = 30000;
}
public IDbTransaction Transaction { get; set; }
public virtual SqlSugarClient Context { get; set; }
public virtual IConnectionConfig MasterConnectionConfig { get; set; }
@ -180,7 +179,7 @@ namespace SqlSugar
this.Transaction = null;
}
}
public abstract SugarParameter[] ToIDbDataParameter(params SugarParameter[] pars);
public abstract IDataParameter[] ToIDbDataParameter(params SugarParameter[] pars);
public abstract void SetCommandToAdapter(IDataAdapter adapter, IDbCommand command);
public abstract IDataAdapter GetAdapter();
public abstract IDbCommand GetCommand(string sql, SugarParameter[] pars);

16
SqlSugar/Databases/SqlServer/Db/SqlServerDb.cs

@ -57,7 +57,7 @@ namespace SqlSugar
}
if (pars != null)
{
IDbDataParameter[] ipars= ToIDbDataParameter(pars);
IDataParameter[] ipars= ToIDbDataParameter(pars);
sqlCommand.Parameters.AddRange((SqlParameter[])ipars);
}
CheckConnection();
@ -73,8 +73,20 @@ namespace SqlSugar
/// </summary>
/// <param name="pars"></param>
/// <returns></returns>
public override SugarParameter[] ToIDbDataParameter(params SugarParameter[] pars)
public override IDataParameter[] ToIDbDataParameter(params SugarParameter[] pars)
{
if (pars == null || pars.Length == 0) return null;
IDataParameter[] reval = new IDataParameter[pars.Length];
foreach (var par in pars)
{
var p = new SqlParameter();
p.ParameterName = par.ParameterName;
p.UdtTypeName = par.UdtTypeName;
p.Size = par.Size;
p.Value = par.Value;
p.DbType = par.DbType;
reval[0] =p;
}
return pars;
}
}

2
SqlSugar/Interface/IDb.cs

@ -13,7 +13,7 @@ namespace SqlSugar
{
IDbConnection Connection { get; set; }
IDbTransaction Transaction { get; set; }
SugarParameter[] ToIDbDataParameter(params SugarParameter[] pars);
IDataParameter[] ToIDbDataParameter(params SugarParameter[] pars);
SugarParameter[] GetParameters(object obj, PropertyInfo[] propertyInfo = null);
SqlSugarClient Context { get; set; }
void ExecLogEvent(string sql, SugarParameter[] pars, bool isStarting = true);

2
SqlSugar/SqlSugar.csproj.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>

BIN
SqlSugar/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.pdb

Binary file not shown.
Loading…
Cancel
Save