Continuing work on issue #41 and #42. Added functionality to delete album and artist records

This commit is contained in:
amazing-username
2019-05-16 21:47:19 -04:00
parent 8f6364922b
commit a471d40cb6
5 changed files with 367 additions and 9 deletions
+10 -2
View File
@@ -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.