using System.Linq;
using Valg.EVA.Skanning.Entity.ReadModel;
using Valg.EVA.Skanning.Entity.SqlConnection;

namespace Valg.EVA.Skanning.Repositories.SystemSettings
{
    public class SystemSettingsRepository : ISystemSettingsRepository
    {
        private readonly ISqlConnectionFactory connectionFactory;

        public SystemSettingsRepository(ISqlConnectionFactory connectionFactory)
        {
            this.connectionFactory = connectionFactory;
        }

        public SystemSetting[] GetSystemSettings()
        {
            return connectionFactory.SP_GetList<SystemSetting>("SystemSetting_GetSystemSettings").ToArray();
        }
    }
}
