diff --git a/test/Microsoft.AspNet.Diagnostics.Entity.FunctionalTests/MigrationsEndPointMiddlewareTest.cs b/test/Microsoft.AspNet.Diagnostics.Entity.FunctionalTests/MigrationsEndPointMiddlewareTest.cs index b0fe588480..4f77e23ec7 100644 --- a/test/Microsoft.AspNet.Diagnostics.Entity.FunctionalTests/MigrationsEndPointMiddlewareTest.cs +++ b/test/Microsoft.AspNet.Diagnostics.Entity.FunctionalTests/MigrationsEndPointMiddlewareTest.cs @@ -91,7 +91,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Tests using (var db = BloggingContextWithMigrations.CreateWithoutExternalServiceProvider(optionsBuilder.Options)) { - var databaseCreator = ((IAccessor)db).GetService(); + var databaseCreator = db.GetService(); Assert.False(databaseCreator.Exists()); var formData = new FormUrlEncodedContent(new List> @@ -106,7 +106,7 @@ namespace Microsoft.AspNet.Diagnostics.Entity.Tests Assert.True(databaseCreator.Exists()); - var historyRepository = ((IAccessor)db).Service.GetRequiredService(); + var historyRepository = db.GetService(); var appliedMigrations = historyRepository.GetAppliedMigrations(); Assert.Equal(2, appliedMigrations.Count); Assert.Equal("111111111111111_MigrationOne", appliedMigrations.ElementAt(0).MigrationId);