public static DIHelper AddBackupRepositoryService(this DIHelper services) { if (services.TryAddScoped <BackupRepository>()) { return(services .AddBackupsContext()); } return(services); }