mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
## v0.3.22
- 优化 导航属性 ManyToOne 名称查找规则; - 增加 IFreeSql.Aop 属性,未来所有拦截方法都在这里,第一期支持如下: * 监控 ToList 返回的的数据,用于拦截重新装饰; * 监视 Where,包括 select/update/delete,返回值 true 时可使上层不被执行; * 可自定义解析表达式; - 增加 ISelect.TractToList,用于单次跟踪或审核实体; - 优化 FreeSql.DbContext SaveChanges;
This commit is contained in:
@ -28,6 +28,8 @@ namespace dbcontext_01.Controllers
|
||||
try {
|
||||
using (var ctx = new SongContext()) {
|
||||
|
||||
ctx.Songs.Select.Where(a => a.Id > 10).ToList();
|
||||
|
||||
var song = new Song { };
|
||||
ctx.Songs.Add(song);
|
||||
id = song.Id;
|
||||
@ -90,7 +92,7 @@ namespace dbcontext_01.Controllers
|
||||
var item22 = await _orm.Select<Song>().Where(a => a.Id == id).FirstAsync();
|
||||
var item33 = await _orm.Select<Song>().Where(a => a.Id > id).ToListAsync();
|
||||
|
||||
return item22.Title;
|
||||
return item22.Id.ToString();
|
||||
}
|
||||
|
||||
// GET api/values/5
|
||||
|
Reference in New Issue
Block a user