diff options
| author | Jake Mannens <jake@asger.xyz> | 2024-09-20 16:13:30 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2024-10-28 14:53:04 +1100 |
| commit | 7c6009abd22d8461039be15d0fd069a460340585 (patch) | |
| tree | 580890eacc1ae2d86ee3f95927e3aed47bb12c96 /PagerContext.cs | |
v0.1v0.1
Diffstat (limited to 'PagerContext.cs')
| -rw-r--r-- | PagerContext.cs | 17 |
1 files changed, 17 insertions, 0 deletions
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<PagerMessage> PagerMessages { get; set; } + public DbSet<ParsedPagerMessage> ParsedPagerMessages { get; set; } + public DbSet<GpsPosition> 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 |
