diff --git a/SharepointToolbox/App.xaml.cs b/SharepointToolbox/App.xaml.cs index fed3a2f..69731a6 100644 --- a/SharepointToolbox/App.xaml.cs +++ b/SharepointToolbox/App.xaml.cs @@ -70,8 +70,11 @@ public partial class App : Application private static void RegisterServices(HostBuilderContext ctx, IServiceCollection services) { - services.AddSingleton(); - services.AddSingleton(); + var appData = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "SharepointToolbox"); + services.AddSingleton(_ => new ProfileRepository(Path.Combine(appData, "profiles.json"))); + services.AddSingleton(_ => new SettingsRepository(Path.Combine(appData, "settings.json"))); services.AddSingleton(); services.AddSingleton(); services.AddSingleton();