mirror of
https://onedev.fprog.nl/OsmToDatabase
synced 2025-12-20 16:58:37 +01:00
Created database context.
This commit is contained in:
parent
24d1b8f3dd
commit
bf9e2da88c
35
OsmToDatabase.Common/OsmContext.cs
Normal file
35
OsmToDatabase.Common/OsmContext.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace OsmToDatabase.Common
|
||||
{
|
||||
public class OsmContext : DbContext
|
||||
{
|
||||
public DbSet<Peak> Peaks { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseNpgsql("Host=10.8.0.4;Username=postgres;Database=peakdata");
|
||||
}
|
||||
}
|
||||
|
||||
public class Peak
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public int Version { get; set; }
|
||||
public DateTime TimeStamp { get; set; }
|
||||
public double Latitude { get; set; }
|
||||
public double Longitude { get; set; }
|
||||
public double? Elevation { get; set; }
|
||||
public double? Prominence { get; set; }
|
||||
public double? Isolation { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? AlternativeName { get; set; }
|
||||
public string? EnglishName { get; set; }
|
||||
public string? EnglishAlternativeName { get; set; }
|
||||
public string? ItalianName { get; set; }
|
||||
public string? SlovenianName { get; set; }
|
||||
public string? GermanName { get; set; }
|
||||
public bool SummitRegisterPresent { get; set; }
|
||||
public string? Wikidata { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue