blob: 73e675ff445118e900c0ca2f74d2fdd402ef639d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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"));
}
|