This commit is contained in:
+10
-2
@@ -98,7 +98,6 @@ namespace Icarus
|
||||
|
||||
var connString = Configuration.GetConnectionString("DefaultConnection");
|
||||
|
||||
// TODO: Add the Genre and Year stores #41 and #42.
|
||||
services.Add(new ServiceDescriptor(typeof(MusicStoreContext),
|
||||
new MusicStoreContext(Configuration
|
||||
.GetConnectionString("DefaultConnection"))));
|
||||
@@ -111,6 +110,14 @@ namespace Icarus
|
||||
new ArtistStoreContext(Configuration
|
||||
.GetConnectionString("DefaultConnection"))));
|
||||
|
||||
services.Add(new ServiceDescriptor(typeof(GenreStoreContext),
|
||||
new GenreStoreContext(Configuration
|
||||
.GetConnectionString("DefaultConnection"))));
|
||||
|
||||
services.Add(new ServiceDescriptor(typeof(YearStoreContext),
|
||||
new YearStoreContext(Configuration
|
||||
.GetConnectionString("DefaultConnection"))));
|
||||
|
||||
services.Add(new ServiceDescriptor(typeof(UserStoreContext),
|
||||
new UserStoreContext(Configuration
|
||||
.GetConnectionString("DefaultConnection"))));
|
||||
@@ -119,7 +126,8 @@ namespace Icarus
|
||||
services.AddDbContext<AlbumContext>(options => options.UseMySQL(connString));
|
||||
services.AddDbContext<ArtistContext>(options => options.UseMySQL(connString));
|
||||
services.AddDbContext<UserContext>(options => options.UseMySQL(connString));
|
||||
// TODO: Add the Genre and Year contexts #41 and #42
|
||||
services.AddDbContext<GenreContext>(options => options.UseMySQL(connString));
|
||||
services.AddDbContext<YearContext>(options => options.UseMySQL(connString));
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
||||
Reference in New Issue
Block a user