From c35afcc1a82eada185bc41d690ae772ae2d87f99 Mon Sep 17 00:00:00 2001 From: Rowan Miller Date: Mon, 26 Oct 2015 09:59:15 -0700 Subject: [PATCH] :green_heart: Prepare for IAccessor API change in EF IAccessor is being renamed to IInfrastructure. The places we use it in this repo can actually use an extension method instead and avoid the cast, so updating to that. --- .../MigrationsEndPointMiddlewareTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);