Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 4618157

Browse files
committed
Aggiornato README
1 parent c2472e7 commit 4618157

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,19 @@ public void ConfigureServices(IServiceCollection services)
3535
//or you can customize the assembly for migrations using the syntax
3636
string migrationsAssembly = "MyAssembly.Migrations.MySQLDatabase";
3737

38-
services.AddDbContextGenericsMethods<MyDbContext>();
38+
services.AddDbContextServicesGenerics<MyDbContext>();
3939

4040
//if you use MySQL database
41-
services.AddDbContextUseMySql(connectionString, retryOnFailure, migrationsAssembly);
41+
services.AddDbContextForMySql(connectionString, retryOnFailure, migrationsAssembly);
4242

4343
//if you use PostgreSQL database
44-
services.AddDbContextUsePostgres(connectionString, retryOnFailure, migrationsAssembly);
44+
services.AddDbContextForPostgres(connectionString, retryOnFailure, migrationsAssembly);
4545

4646
//if you use SQLServer database
47-
services.AddDbContextUseSQLServer(connectionString, retryOnFailure, migrationsAssembly);
47+
services.AddDbContextForSQLServer(connectionString, retryOnFailure, migrationsAssembly);
4848

49-
//if you use SQLite database
50-
//in this case the retryOnFailure is not necessary as SQLite is not subject to transient errors
51-
services.AddDbContextUseSQLite(connectionString, migrationsAssembly);
49+
//if you use SQLite database but in this case the retryOnFailure is not necessary as SQLite is not subject to transient errors
50+
services.AddDbContextForSQLite(connectionString, migrationsAssembly);
5251
}
5352
```
5453

@@ -76,7 +75,7 @@ public void ConfigureServices(IServiceCollection services)
7675
}
7776
```
7877

79-
## Example entity interface
78+
## Example entity
8079
```csharp
8180
public class MyEntity : IEntity<int>
8281
{
@@ -86,6 +85,18 @@ public class MyEntity : IEntity<int>
8685
}
8786
```
8887

88+
## Example interface
89+
```csharp
90+
public interface IMyService
91+
{
92+
Task<List<MyEntity>> GetListItemAsync();
93+
Task<MyEntity> GetItemAsync(int id);
94+
Task CreateItemAsync(MyEntity item);
95+
Task UpdateItemAsync(MyEntity item);
96+
Task DeleteItemAsync(MyEntity item);
97+
}
98+
```
99+
89100
## Example class
90101
```csharp
91102
public class MyService : IMyService
@@ -126,18 +137,6 @@ public class MyService : IMyService
126137
}
127138
```
128139

129-
## Example interface
130-
```csharp
131-
public interface IMyService
132-
{
133-
Task<List<MyEntity>> GetListItemAsync();
134-
Task<MyEntity> GetItemAsync(int id);
135-
Task CreateItemAsync(MyEntity item);
136-
Task UpdateItemAsync(MyEntity item);
137-
Task DeleteItemAsync(MyEntity item);
138-
}
139-
```
140-
141140
## :muscle: Contributing
142141

143142
Contributions and/or suggestions are always welcome.

0 commit comments

Comments
 (0)