Skip to content

Commit

Permalink
required service
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrigger committed Jul 4, 2024
1 parent 3d13917 commit 471eca9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion F2.Repository/Extensions/ApplicationBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static IApplicationBuilder UseDatabaseMigration<TDbContext>(this IApplica
{
// UseAutoMigrateDatabase?
using var serviceScope = applicationBuilder.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope();
var context = serviceScope.ServiceProvider.GetService<TDbContext>();
var context = serviceScope.ServiceProvider.GetRequiredService<TDbContext>();
context.Database.Migrate();

return applicationBuilder;
Expand Down
2 changes: 1 addition & 1 deletion F2.Repository/F2.Repository.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Description>Generic repository base pattern for EF Core + DatabaseScope</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>F2,resository</PackageTags>
<Version>8.0.6</Version>
<Version>8.0.6.1</Version>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
Expand Down

0 comments on commit 471eca9

Please sign in to comment.