mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 01:14:33 +08:00
Update Demo
This commit is contained in:
parent
85c8941fc0
commit
00c05aa393
@ -87,6 +87,7 @@
|
|||||||
<Compile Include="Models\Unit\Custom1\EOrderReturnDetail.cs" />
|
<Compile Include="Models\Unit\Custom1\EOrderReturnDetail.cs" />
|
||||||
<Compile Include="Models\Unit\Custom1\PurchaseDetailModel.cs" />
|
<Compile Include="Models\Unit\Custom1\PurchaseDetailModel.cs" />
|
||||||
<Compile Include="Models\ViewOrder.cs" />
|
<Compile Include="Models\ViewOrder.cs" />
|
||||||
|
<Compile Include="UnitTest\UInsert.cs" />
|
||||||
<Compile Include="UnitTest\UQueue.cs" />
|
<Compile Include="UnitTest\UQueue.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
@ -31,6 +31,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
Insert();
|
||||||
Queue();
|
Queue();
|
||||||
CodeFirst();
|
CodeFirst();
|
||||||
Updateable();
|
Updateable();
|
||||||
|
29
Src/Asp.Net/MySqlTest/UnitTest/UInsert.cs
Normal file
29
Src/Asp.Net/MySqlTest/UnitTest/UInsert.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
public partial class NewUnitTest
|
||||||
|
{
|
||||||
|
public class Unit4ASDF
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(ColumnDataType = " bigint(20)",IsNullable =true)]
|
||||||
|
public long? Id { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(ColumnDataType = " bigint(20)" )]
|
||||||
|
public long Id2 { get; set; }
|
||||||
|
}
|
||||||
|
public static void Insert()
|
||||||
|
{
|
||||||
|
Db.CodeFirst.InitTables<Unit4ASDF>();
|
||||||
|
Db.Insertable(new List<Unit4ASDF>() {
|
||||||
|
new Unit4ASDF() { Id=null, Id2=1 },
|
||||||
|
new Unit4ASDF() { Id=2, Id2=1 }}).UseMySql().ExecuteBlueCopy();
|
||||||
|
|
||||||
|
var list = Db.Queryable<Unit4ASDF>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user