Add test case

This commit is contained in:
sunkaixuan 2023-11-13 11:24:02 +08:00
parent 39c1dc4d80
commit b3b45e5e0a
2 changed files with 49 additions and 0 deletions

View File

@ -32,6 +32,7 @@ namespace OrmTest
}
public static void Init()
{
Unitafadsa.Init();
UnitSplitTask.Init();
UnitBulkMerge.Init();
UnitBizDelete.Init();

View 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; }
}
}
}