using Microsoft.Extensions.Configuration;
using Npgsql;
using System.Data;

namespace WK_KLI_LAPS_Service.App_Data
{
    public class ConnectionBase
    {
        public static IDbConnection Connection
        {
            get
            {
                string constr = Startup.Configuration.GetValue<string>("DBInfo:ConnectionString");
                return new NpgsqlConnection(constr);
            }
        }

        public static IDbConnection ConnectionAI
        {
            get
            {
                string constr = Startup.Configuration.GetValue<string>("DBInfo:AIConnectionString");
                return new NpgsqlConnection(constr);
            }
        }

        public class ResultMaster
        {
            public int Result { get; set; }

            public string Message { get; set; }
        }
    }
}
