mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Support enum
This commit is contained in:
25
Src/Asp.Net/SqlServerTest/UnitTest/EnumTest.cs
Normal file
25
Src/Asp.Net/SqlServerTest/UnitTest/EnumTest.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OrmTest.Demo;
|
||||
using OrmTest.Models;
|
||||
|
||||
namespace OrmTest.UnitTest
|
||||
{
|
||||
public class EnumTest : UnitTestBase
|
||||
{
|
||||
private EnumTest() { }
|
||||
public EnumTest(int eachCount)
|
||||
{
|
||||
this.Count = eachCount;
|
||||
}
|
||||
public void Init()
|
||||
{
|
||||
|
||||
var db = GetInstance();
|
||||
var shoolValue = SchoolEnum.HarvardUniversity;
|
||||
var list = db.Queryable<StudentEnum>().AS("student").Where(it => it.SchoolId == shoolValue).ToList();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user