SqlSugar/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/UnitDataTable.cs
2024-03-26 09:00:34 +08:00

26 lines
694 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
internal class UnitDataTable
{
public static void Init()
{
var db = NewUnitTest.Db;
db.CodeFirst.InitTables<Unitadfadsfa>();
var list=new List<Unitadfadsfa>() { new Unitadfadsfa() { Id=Guid.NewGuid(), Name="a" },
new Unitadfadsfa() { Id=Guid.NewGuid(),Name="a" }};
db.Storageable(list).WhereColumns(it => it.Id).ExecuteCommand();
}
}
public class Unitadfadsfa
{
public Guid Id { get; set; }
public string Name { get; set; }
}
}