blob: 0466622666ddd3915d8b58249188bf6438e5a573 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using Microsoft.EntityFrameworkCore;
namespace PagerParser;
public partial 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"));
}
|