Update Nuget Test

This commit is contained in:
skx 2020-03-31 16:47:15 +08:00
parent a5a81a4491
commit 30b9baf529
6 changed files with 15 additions and 8 deletions

View File

@ -8,9 +8,10 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>NugetTest</RootNamespace> <RootNamespace>NugetTest</RootNamespace>
<AssemblyName>NugetTest</AssemblyName> <AssemblyName>NugetTest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -30,10 +32,11 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="SqlSugar, Version=4.9.7.3, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SqlSugar, Version=5.0.0.13, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\sqlSugar.4.9.7.3\lib\SqlSugar.dll</HintPath> <HintPath>..\packages\sqlSugar.5.0.0.13\lib\SqlSugar.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -48,6 +51,7 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -12,7 +12,7 @@ namespace NugetTest
{ {
var db = new SqlSugarClient(new ConnectionConfig() var db = new SqlSugarClient(new ConnectionConfig()
{ {
ConnectionString = "server=.;uid=sa;pwd=@jhl85661501;database=SqlSugar4XTest", ConnectionString = "server=.;uid=sa;pwd=haosql;database=SqlSugar4XTest",
IsAutoCloseConnection = true, IsAutoCloseConnection = true,
DbType = DbType.SqlServer DbType = DbType.SqlServer
}); });

View File

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

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="sqlSugar" version="4.9.7.3" targetFramework="net40" /> <package id="sqlSugar" version="5.0.0.13" targetFramework="net40" />
</packages> </packages>

View File

@ -6,7 +6,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="sqlSugarCore" Version="4.6.4.7" /> <PackageReference Include="sqlSugarCore" Version="5.0.0.13" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -9,14 +9,14 @@ namespace NugetTest
var db = new SqlSugarClient(new ConnectionConfig() { var db = new SqlSugarClient(new ConnectionConfig() {
ConnectionString=Config.ConnectionString, ConnectionString=Config.ConnectionString,
IsAutoCloseConnection=true, IsAutoCloseConnection=true,
DbType=DbType.Oracle DbType=DbType.SqlServer
}); });
var list = db.Ado.GetInt("select 1"); var list = db.Ado.GetInt("select 1");
Console.WriteLine("Hello World!"); Console.WriteLine("Hello World!");
} }
public class Config public class Config
{ {
public static string ConnectionString = "Database=SqlSugar4xTest;Data Source=127.0.0.1;User Id=root;Password=root;pooling=false;CharSet=utf8;port=3306"; public static string ConnectionString = "server=.;uid=sa;pwd=haosql;database=SQLSUGAR4XTEST";
} }
} }
} }