From 7c6009abd22d8461039be15d0fd069a460340585 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 20 Sep 2024 16:13:30 +1000 Subject: v0.1 --- PagerContext.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 PagerContext.cs (limited to 'PagerContext.cs') diff --git a/PagerContext.cs b/PagerContext.cs new file mode 100644 index 0000000..73e675f --- /dev/null +++ b/PagerContext.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore; + +namespace PagerParser; + +public class PagerContext : DbContext { + public DbSet PagerMessages { get; set; } + public DbSet ParsedPagerMessages { get; set; } + public DbSet GpsPositions { get; set; } + + private IConfiguration config; + + public PagerContext(IConfiguration config) => + this.config = config; + + protected override void OnConfiguring(DbContextOptionsBuilder options) => + options.UseNpgsql(config.GetConnectionString("DefaultConnection")); +} \ No newline at end of file -- cgit v1.3