sunkaixuan
7 years ago
3 changed files with 40 additions and 1 deletions
@ -0,0 +1,12 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<OutputType>Exe</OutputType> |
||||
|
<TargetFramework>netcoreapp2.0</TargetFramework> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="sqlSugarCore" Version="4.5.9.9" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
@ -0,0 +1,21 @@ |
|||||
|
using System; |
||||
|
using SqlSugar; |
||||
|
namespace NugetTest |
||||
|
{ |
||||
|
class Program |
||||
|
{ |
||||
|
static void Main(string[] args) |
||||
|
{ |
||||
|
var db = new SqlSugarClient(new ConnectionConfig() { |
||||
|
ConnectionString=Config.ConnectionString, |
||||
|
IsAutoCloseConnection=true |
||||
|
}); |
||||
|
var list = db.Ado.GetInt("select 1"); |
||||
|
Console.WriteLine("Hello World!"); |
||||
|
} |
||||
|
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"; |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue