-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDatabaseContext.cs
29 lines (25 loc) · 930 Bytes
/
DatabaseContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ArcticWolf.Storage
{
public class DatabaseContext : DbContext
{
public DbSet<FnVersion> FnVersions { get; set; }
public DbSet<TkKey> TkKeys { get; set; }
public DbSet<PakFile> PakFiles { get; set; }
public DbSet<FnEventFlag> FnEventFlags { get; set; }
public DbSet<FnEventFlagTimeSpan> FnEventFlagTimeSpans { get; set; }
public DbSet<FnEventFlagModification> FnEventFlagModifications { get; set; }
public string DbPath { get; private set; }
public DatabaseContext(string dbPath = "db.sqlite")
{
DbPath = dbPath;
}
protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseSqlite($"Data Source={DbPath}");
}
}