using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL.Models;
using Microsoft.Extensions.Configuration;

namespace BLL
{
    public class BLLService
    {
        private readonly DAL.DALConfiguration _dalConfig;
        private readonly DAS.DASConfiguration _dasConfig;
        private readonly DAL.Implementacion.DGAMedicionScadaRepository _dgaMedicionScadaRepository;
        public BLLService(IConfiguration config) { 
            _dalConfig = new DAL.DALConfiguration(config);
            _dasConfig = new DAS.DASConfiguration(config);
            _dgaMedicionScadaRepository = new DAL.Implementacion.DGAMedicionScadaRepository(config);
        }

        public void test()
        {
            //_dalConfig.TestConexion();
            //_dasConfig.TestConexion();
        }

        public async Task<List<MedicionScada>> ObtenerMedicionesAsync()
        {
            return await _dgaMedicionScadaRepository.ObtenerMedicionesAsync();
        }
    }
}
