mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-05-01 06:42:50 +08:00

- 优化 导航属性 ManyToOne 名称查找规则; - 增加 IFreeSql.Aop 属性,未来所有拦截方法都在这里,第一期支持如下: * 监控 ToList 返回的的数据,用于拦截重新装饰; * 监视 Where,包括 select/update/delete,返回值 true 时可使上层不被执行; * 可自定义解析表达式; - 增加 ISelect.TractToList,用于单次跟踪或审核实体; - 优化 FreeSql.DbContext SaveChanges;
52 lines
909 B
C#
52 lines
909 B
C#
using FreeSql.DataAnnotations;
|
|
using System;
|
|
using Xunit;
|
|
|
|
namespace FreeSql.Tests.PostgreSQL {
|
|
public class PostgreSQLAdoTest {
|
|
[Fact]
|
|
public void Pool() {
|
|
var t1 = g.pgsql.Ado.MasterPool.StatisticsFullily;
|
|
}
|
|
|
|
[Fact]
|
|
public void SlavePools() {
|
|
var t2 = g.pgsql.Ado.SlavePools.Count;
|
|
}
|
|
|
|
[Fact]
|
|
public void ExecuteReader() {
|
|
|
|
}
|
|
[Fact]
|
|
public void ExecuteArray() {
|
|
|
|
}
|
|
[Fact]
|
|
public void ExecuteNonQuery() {
|
|
|
|
}
|
|
[Fact]
|
|
public void ExecuteScalar() {
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public void Query() {
|
|
|
|
g.pgsql.CodeFirst.SyncStructure<xxx>();
|
|
var t3 = g.pgsql.Ado.Query<xxx>("select * from xxx");
|
|
|
|
var t4 = g.pgsql.Ado.Query<(int, string, string)>("select * from xxx");
|
|
|
|
var t5 = g.pgsql.Ado.Query<dynamic>("select * from xxx");
|
|
}
|
|
|
|
class xxx {
|
|
public int Id { get; set; }
|
|
public string Path { get; set; }
|
|
public string Title2 { get; set; }
|
|
}
|
|
}
|
|
}
|