mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-26 14:15:50 +08:00
Optimize project catalog
This commit is contained in:
12
Src/Asp.NetCore2/NugetTest/NugetTest.csproj
Normal file
12
Src/Asp.NetCore2/NugetTest/NugetTest.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="sqlSugarCore" Version="5.0.0.13" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
22
Src/Asp.NetCore2/NugetTest/Program.cs
Normal file
22
Src/Asp.NetCore2/NugetTest/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
namespace NugetTest
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var db = new SqlSugarClient(new ConnectionConfig() {
|
||||
ConnectionString=Config.ConnectionString,
|
||||
IsAutoCloseConnection=true,
|
||||
DbType=DbType.SqlServer
|
||||
});
|
||||
var list = db.Ado.GetInt("select 1");
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
public class Config
|
||||
{
|
||||
public static string ConnectionString = "server=.;uid=sa;pwd=haosql;database=SQLSUGAR4XTEST";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user