mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Add user test demo
This commit is contained in:
parent
eb9862a2ae
commit
3407104815
@ -265,6 +265,7 @@
|
||||
<Compile Include="UserTestCases\Cases\UThread.cs" />
|
||||
<Compile Include="6_NavigationPropertyQuery.cs" />
|
||||
<Compile Include="UserTestCases\Cases.cs" />
|
||||
<Compile Include="UserTestCases\Cases\Unitadfafad.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SqlSugar\SqlSugar.csproj">
|
||||
|
@ -31,6 +31,7 @@ namespace OrmTest
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
Unitadfafad.Init();
|
||||
UnitAny.Init();
|
||||
UnitDynamicaaa.Init();
|
||||
UnitBizDel.Init();
|
||||
|
31
Src/Asp.Net/SqlServerTest/UserTestCases/Cases/Unitadfafad.cs
Normal file
31
Src/Asp.Net/SqlServerTest/UserTestCases/Cases/Unitadfafad.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
internal class Unitadfafad
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
var list=db.Queryable<Order>()
|
||||
.Select(it => new Modelsdfa(it.Name, it.Id))
|
||||
.ToList();
|
||||
}
|
||||
public class Modelsdfa
|
||||
{
|
||||
public Modelsdfa(string name,int id)
|
||||
{
|
||||
Name = name;
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user