using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SQLite;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace SimpleCRM.Units
{
    public class DbHelper
    {
        private static string GetConnectionString()
        {
            return string.Format(@"data source ={0}db\db.db; version = 3;", AppDomain.CurrentDomain.BaseDirectory);
        }
        public static IDbConnection GetConnection()
        {
            string connString = GetConnectionString();
            SQLiteConnection cnn = new SQLiteConnection(connString);
            cnn.Open();
            return cnn;
        }


        public static SQLiteConnection GetSqliteConnection()
        {
            string connString = GetConnectionString();
            SQLiteConnection cnn = new SQLiteConnection(connString);
            cnn.Open();
            return cnn;
        }
    }
}
