Skip to content

Commit 4c4543c

Browse files
authored
chore: Modify the introduction of Uow usage documentation (#3)
* chore: Modify the introduction of Uow usage documentation * chore: Remove invalid comments
1 parent a1e3dc5 commit 4c4543c

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,14 @@ Install-Package MASA.Contrib.Data.Contracts.EF
118118
```
119119

120120
```C#
121-
builder.Services
122-
.AddUoW<CustomDbContext>(dbOptions =>
121+
builder.Services.AddEventBus(options => {
122+
options.UseUoW<CustomDbContext>(dbOptions =>
123123
{
124124
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
125-
dbOptions.UseSoftDelete(builder.Services);//Start soft delete
126-
})
125+
dbOptions.UseSoftDelete(builder.Services);
126+
});
127+
});
128+
127129
```
128130

129131
> When the entity inherits ISoftware and is deleted, change the delete state to the modified state, and cooperate with the custom Remove operation to achieve soft deletion

README.zh-CN.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,13 @@ Install-Package MASA.Contrib.Data.Contracts.EF
118118
```
119119

120120
```C#
121-
builder.Services
122-
.AddUoW<CustomDbContext>(dbOptions =>
121+
builder.Services.AddEventBus(options => {
122+
options.UseUoW<CustomDbContext>(dbOptions =>
123123
{
124124
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
125125
dbOptions.UseSoftDelete(builder.Services);//启动软删除
126-
})
126+
});
127+
});
127128
```
128129

129130
> 当实体继承ISoftware,且被删除时,将删除状态改为修改状态,并配合自定义Remove操作,实现软删除

src/Data/MASA.Contrib.Data.Contracts.EF/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ Install-Package MASA.Contrib.Data.Contracts.EF
1010
```
1111

1212
```C#
13-
builder.Services
14-
.AddUoW<CustomDbContext>(dbOptions =>
13+
builder.Services.AddEventBus(options => {
14+
options.UseUoW<CustomDbContext>(dbOptions =>
1515
{
1616
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
1717
dbOptions.UseSoftDelete(builder.Services);
18-
})
18+
});
19+
});
1920
```
2021

2122
> When the entity inherits ISoftware and is deleted, change the delete state to the modified state, and cooperate with the custom Remove operation to achieve soft deletion

src/Data/MASA.Contrib.Data.Contracts.EF/README.zh-CN.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ Install-Package MASA.Contrib.Data.Contracts.EF
1010
```
1111

1212
```C#
13-
builder.Services
14-
.AddUoW<CustomDbContext>(dbOptions =>
13+
builder.Services.AddEventBus(options => {
14+
options.UseUoW<CustomDbContext>(dbOptions =>
1515
{
1616
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
1717
dbOptions.UseSoftDelete(builder.Services);//启动软删除
18-
})
18+
});
19+
});
1920
```
2021

2122
> 当实体继承ISoftware,且被删除时,将删除状态改为修改状态,并配合自定义Remove操作,实现软删除

src/Data/MASA.Contrib.Data.UoW.EF/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ Install-Package MASA.Contrib.Data.Contracts.EF
1010
```
1111

1212
```C#
13-
builder.Services
14-
.AddUoW<CustomDbContext>(dbOptions =>
13+
builder.Services.AddEventBus(options => {
14+
options.UseUoW<CustomDbContext>(dbOptions =>
1515
{
1616
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
17-
})
17+
});
18+
});
1819
```
1920

src/Data/MASA.Contrib.Data.UoW.EF/README.zh-CN.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ Install-Package MASA.Contrib.Data.Contracts.EF
1010
```
1111

1212
```C#
13-
builder.Services
14-
.AddUoW<CustomDbContext>(dbOptions =>
13+
builder.Services.AddEventBus(options => {
14+
options.UseUoW<CustomDbContext>(dbOptions =>
1515
{
1616
dbOptions.UseSqlServer("server=localhost;uid=sa;pwd=P@ssw0rd;database=identity");
17-
})
17+
});
18+
});
1819
```
1920

0 commit comments

Comments
 (0)