Put interface behind database provider for testing. Use state object to get data from database, then map to model.
This commit is contained in:
parent
5a0d0933ce
commit
20ccdd07f1
11 changed files with 118 additions and 34 deletions
|
@ -39,7 +39,7 @@ namespace Website
|
|||
}
|
||||
|
||||
private void RegisterRepositories(IServiceCollection services) =>
|
||||
services.AddSingleton<DatabaseProvider, DatabaseProvider>()
|
||||
services.AddSingleton<IDatabaseProvider, MySQLDatabaseProvider>()
|
||||
.AddSingleton<BlogRepository, BlogRepository>();
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue