mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add test case
This commit is contained in:
parent
39c1dc4d80
commit
b3b45e5e0a
@ -32,6 +32,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
Unitafadsa.Init();
|
||||||
UnitSplitTask.Init();
|
UnitSplitTask.Init();
|
||||||
UnitBulkMerge.Init();
|
UnitBulkMerge.Init();
|
||||||
UnitBizDelete.Init();
|
UnitBizDelete.Init();
|
||||||
|
48
Src/Asp.NetCore2/SqliteTest/UserTestCases/Unitafadsa.cs
Normal file
48
Src/Asp.NetCore2/SqliteTest/UserTestCases/Unitafadsa.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
internal class Unitafadsa
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
var db = NewUnitTest.Db;
|
||||||
|
db.CodeFirst.InitTables<School>();
|
||||||
|
db.CodeFirst.InitTables<School2>();
|
||||||
|
db.Queryable<School2>().ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 多主键表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("dbschool")]
|
||||||
|
public class School
|
||||||
|
{
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public int SchoolId { get; set; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 多主键表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("dbschool")]
|
||||||
|
public class School2
|
||||||
|
{
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public int SchoolId { get; set; }
|
||||||
|
|
||||||
|
public string Remark { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user