FileSqlServerSync/Server/RemoteServer/Models/SqliteDbContext.cs
2024-10-12 22:01:48 +08:00

18 lines
584 B
C#

using Microsoft.EntityFrameworkCore;
namespace RemoteServer.Models;
public class SqliteDbContext(IConfiguration configuration) : DbContext
{
protected readonly IConfiguration Configuration = configuration;
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; }
}