You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi.Store/Repository/ApplicationConfigRepository.cs

23 lines
612 B

using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Ombi.Store.Context;
using Ombi.Store.Entities;
namespace Ombi.Store.Repository
{
public class ApplicationConfigRepository : IApplicationConfigRepository
{
public ApplicationConfigRepository(IOmbiContext ctx)
{
Ctx = ctx;
}
private IOmbiContext Ctx { get; }
public async Task<ApplicationConfiguration> Get(ConfigurationTypes type)
{
return await Ctx.ApplicationConfigurations.FirstOrDefaultAsync(x => x.Type == type);
}
}
}