2024-06-24 09:27:12 +00:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace RemoteServer.Models;
|
|
|
|
|
|
2024-09-05 01:59:57 +00:00
|
|
|
|
public class SqliteDbContext(IConfiguration configuration) : DbContext
|
2024-06-24 09:27:12 +00:00
|
|
|
|
{
|
2024-09-05 01:59:57 +00:00
|
|
|
|
protected readonly IConfiguration Configuration = configuration;
|
2024-06-24 09:27:12 +00:00
|
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlite(Configuration.GetConnectionString("DbPath"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DbSet<SyncLogHead> SyncLogHeads { get; set; }
|
|
|
|
|
public DbSet<SyncLogFile> SyncLogFiles { get; set; }
|
|
|
|
|
public DbSet<SyncGitCommit> SyncGitCommits { get; set; }
|
|
|
|
|
}
|