using Npgsql;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using LAPS_WATCHER.Configure;
using Microsoft.Extensions.Configuration;

namespace LAPS_WATCHER.App_Data
{
    public class ConnectionBase
    {
        public static IDbConnection Connection
        {
            get
            {
                string constr = CustomConfiguration.AppSettings.GetValue<string>("DBInfo:ConnectionString");
                return new NpgsqlConnection(constr);
            }
        }
        public class ResultMaster
        {
            public int Result { get; set; }

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