diff --git a/OliverBooth/Services/ConfigurationService.cs b/OliverBooth/Services/ConfigurationService.cs deleted file mode 100644 index 5a7f777..0000000 --- a/OliverBooth/Services/ConfigurationService.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using OliverBooth.Data; - -namespace OliverBooth.Services; - -/// -/// Represents a service for retrieving configuration values. -/// -public sealed class ConfigurationService -{ - private readonly IDbContextFactory _webContextFactory; - - /// - /// Initializes a new instance of the class. - /// - /// - /// The for the . - /// - public ConfigurationService(IDbContextFactory webContextFactory) - { - _webContextFactory = webContextFactory; - } - - /// - /// Gets the value of a site configuration key. - /// - /// The key of the site configuration item. - /// The value of the site configuration item. - public string? GetSiteConfiguration(string key) - { - using WebContext context = _webContextFactory.CreateDbContext(); - return context.SiteConfiguration.Find(key)?.Value; - } -}