Browse Source

Update Demo

pull/12/MERGE
sunkaixuan 6 years ago
parent
commit
b6d490ea3d
  1. 4
      Src/Asp.Net/SqlServerTest/Demo/DemoD_DbFirst.cs
  2. 3
      Src/Asp.Net/SqlServerTest/Demo/Democ_GobalFilter.cs

4
Src/Asp.Net/SqlServerTest/Demo/DemoD_DbFirst.cs

@ -10,6 +10,8 @@ namespace OrmTest
{
public static void Init()
{
Console.WriteLine();
Console.WriteLine("#### DbFirst Start ####");
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
{
DbType = DbType.SqlServer,
@ -62,6 +64,8 @@ namespace OrmTest
}
}
db.DbFirst.IsCreateAttribute().CreateClassFile("c:\\Demo\\8", "Models");
Console.WriteLine("#### DbFirst End ####");
}
}
}

3
Src/Asp.Net/SqlServerTest/Demo/Democ_GobalFilter.cs

@ -10,6 +10,8 @@ namespace OrmTest
{
public static void Init()
{
Console.WriteLine("");
Console.WriteLine("#### Filter Start ####");
var db = GetInstance();
@ -30,6 +32,7 @@ namespace OrmTest
var sql4 = db.Queryable<Order>().Filter("Myfilter",isDisabledGobalFilter:true).ToSql();//only Myfilter
//SELECT [Id],[Name],[Price],[CreateTime] FROM [Order] WHERE Name='jack'
Console.WriteLine(sql4);
Console.WriteLine("#### Filter End ####");
}

Loading…
Cancel
Save