mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-04 07:20:51 +08:00
update
@@ -18,6 +18,8 @@ using (var ctx = fsql.CreateDbContext()) {
|
||||
}
|
||||
```
|
||||
|
||||
> 注意:DbContext 对象多线程不安全
|
||||
|
||||
1、在 OnConfiguring 方法上配置与 IFreeSql 关联
|
||||
|
||||
```csharp
|
||||
|
||||
@@ -28,6 +28,8 @@ var curd1 = fsql.GetRepository<Song, int>();
|
||||
var curd2 = fsql.GetGuidRepository<Song>();
|
||||
```
|
||||
|
||||
> 注意:BaseRepository 对象多线程不安全
|
||||
|
||||
2、继承现实;
|
||||
|
||||
```csharp
|
||||
|
||||
Reference in New Issue
Block a user