mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-06 16:30:52 +08:00
update
@@ -9,7 +9,7 @@ FreeSql.DbContext 实现类似 EFCore 使用方法,跟踪对象状态,最终
|
||||
## 如何使用
|
||||
|
||||
0、通用方法,为啥是0???
|
||||
|
||||
```
|
||||
using (var ctx = fsql.CreateDbContext()) {
|
||||
//var db1 = ctx.Set<Song>();
|
||||
//var db2 = ctx.Set<Tag>();
|
||||
@@ -18,6 +18,7 @@ using (var ctx = fsql.CreateDbContext()) {
|
||||
ctx.Add(item);
|
||||
ctx.SaveChanges();
|
||||
}
|
||||
```
|
||||
|
||||
1、在 OnConfiguring 方法上配置与 IFreeSql 关联
|
||||
|
||||
|
||||
Reference in New Issue
Block a user