Browse Source

Add unit test

pull/31/head
sunkaixuan 2 years ago
parent
commit
8d5ed85d24
  1. 8
      Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs

8
Src/Asp.Net/PgSqlTest/Demo/DemoE_CodeFirst.cs

@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace OrmTest
@ -73,9 +74,16 @@ namespace OrmTest
db.CodeFirst.InitTables<CodeFloatddfa1a1>();
db.Insertable(new CodeFloatddfa1a1() { xx = (float)11.1 }).ExecuteCommand();
var list7 = db.Queryable<CodeFloatddfa1a1>().ToList();
db.CodeFirst.InitTables<CodeFloatddfa1a2>();
db.Insertable(new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }).ExecuteCommand();
db.Insertable(new List<CodeFloatddfa1a2> { new CodeFloatddfa1a2() { xx = DateTimeOffset.Now }, new CodeFloatddfa1a2() { xx = DateTimeOffset.Now } }).ExecuteCommand();
Console.WriteLine("#### CodeFirst end ####");
}
}
public class CodeFloatddfa1a2
{
public DateTimeOffset xx { get; set; }
}
public class CodeFloatddfa1a1
{
public float xx { get; set; }

Loading…
Cancel
Save