- 调整 FreeSql.Provider.SqlServer 引用Microsoft.Data.SqlClient #391;

This commit is contained in:
28810
2020-07-27 19:39:12 +08:00
parent e80f179663
commit 072a8b7cfa
10 changed files with 40 additions and 10 deletions

View File

@ -17,6 +17,7 @@
<PackageReference Include="Dapper" Version="2.0.35" />
<PackageReference Include="IdleBus" Version="1.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">

View File

@ -79,7 +79,7 @@ namespace FreeSql.Tests.SqlServer
var t4 = g.sqlserver.Ado.Query<(int, int, string, string DateTime)>("select * from xxx");
var t5 = g.sqlserver.Ado.Query<dynamic>(System.Data.CommandType.Text, "select * from xxx where Id = @Id",
new System.Data.SqlClient.SqlParameter("Id", 1));
new Microsoft.Data.SqlClient.SqlParameter("Id", 1));
}
[Fact]

View File

@ -11,7 +11,7 @@ using System.Linq.Expressions;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.Threading;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using kwlib;
using System.Text;

View File

@ -41,6 +41,7 @@ public class g
static Lazy<IFreeSql> sqlserverLazy = new Lazy<IFreeSql>(() => new FreeSql.FreeSqlBuilder()
.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3")
//.UseConnectionFactory(FreeSql.DataType.SqlServer, () => new Microsoft.Data.SqlClient.SqlConnection("Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;"))
//.UseConnectionFactory(FreeSql.DataType.SqlServer, () => new System.Data.SqlClient.SqlConnection("Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;"))
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=192.168.164.129;uid=sa;pwd=123456;Initial Catalog=ds_shop;Pooling=true;Max Pool Size=3")
//.UseConnectionFactory(FreeSql.DataType.SqlServer, () => new System.Data.SqlClient.SqlConnection("Data Source=192.168.164.129;uid=sa;pwd=123456;Initial Catalog=ds_shop;Pooling=true;"))