@@ -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
8180public 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
91102public 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
143142Contributions and/or suggestions are always welcome.
0 commit comments