diff --git a/src/EFCore.Jet/Design/Internal/JetDesignTimeServices.cs b/src/EFCore.Jet/Design/Internal/JetDesignTimeServices.cs index 90690d0..793fa2b 100644 --- a/src/EFCore.Jet/Design/Internal/JetDesignTimeServices.cs +++ b/src/EFCore.Jet/Design/Internal/JetDesignTimeServices.cs @@ -5,7 +5,9 @@ using EntityFrameworkCore.Jet.Infrastructure.Internal; using EntityFrameworkCore.Jet.Internal; using EntityFrameworkCore.Jet.Scaffolding.Internal; using EntityFrameworkCore.Jet.Storage.Internal; +using EntityFrameworkCore.Jet.Update.Internal; using Microsoft.EntityFrameworkCore.Design; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Storage; @@ -28,12 +30,22 @@ namespace EntityFrameworkCore.Jet.Design.Internal /// doing so can result in application failures when updating to a new Entity Framework Core release. /// public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollection) - => serviceCollection - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton(); + { + serviceCollection.AddEntityFrameworkJet(); +#pragma warning disable EF1001 // Internal EF Core API usage. + new EntityFrameworkRelationalDesignServicesBuilder(serviceCollection) + .TryAdd() + .TryAdd() + .TryAdd() +#pragma warning restore EF1001 // Internal EF Core API usage. + .TryAdd() + .TryAdd() + .TryAddProviderSpecificServices( + b => b + .TryAddSingleton() + .TryAddSingleton() + .TryAddScoped()) + .TryAddCoreServices(); + } } } \ No newline at end of file