mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
update readme
This commit is contained in:
@ -125,16 +125,13 @@ fsql.Select<Song>().OrderBy(a => Guid.NewGuid()).Limit(10).ToList();
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
[Transactional]
|
[Transactional]
|
||||||
public void Add()
|
public void Add() {
|
||||||
{
|
|
||||||
var repo = ioc.GetService<BaseRepository<Tag>>();
|
var repo = ioc.GetService<BaseRepository<Tag>>();
|
||||||
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
|
repo.DbContextOptions.EnableAddOrUpdateNavigateList = true;
|
||||||
|
|
||||||
var item = new Tag
|
var item = new Tag {
|
||||||
{
|
|
||||||
Name = "testaddsublist",
|
Name = "testaddsublist",
|
||||||
Tags = new[]
|
Tags = new[] {
|
||||||
{
|
|
||||||
new Tag { Name = "sub1" },
|
new Tag { Name = "sub1" },
|
||||||
new Tag { Name = "sub2" }
|
new Tag { Name = "sub2" }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user