David Claeys 8d198d46e0
All checks were successful
Build docker container / build (push) Successful in 5m4s
initial commit
2024-05-10 16:06:42 +02:00

27 lines
639 B
C#

using SQLite;
using System.IO;
using TelebilbaoEpg.Database.Models;
namespace TelebilbaoEpg.Database.Repository
{
public abstract class BaseRepository
{
protected SQLiteConnection _db;
public BaseRepository()
{
var storeFile = "/data/telebilbaoEpg.db";
#if DEBUG
storeFile = storeFile.Replace("/data/", "");
#endif
// Get an absolute path to the database file
var databasePath = Path.Combine(Directory.GetCurrentDirectory(), storeFile);
_db = new SQLiteConnection(databasePath);
_db.CreateTable<BroadCast>();
}
}
}