using Microsoft.EntityFrameworkCore; namespace WhatApi; public class Database(DbContextOptions options) : DbContext(options) { public DbSet Content { get; set; } public DbSet Places { get; set; } protected override void OnModelCreating(ModelBuilder b) { b.HasPostgresExtension("postgis"); b.Entity(e => { e.Property(x => x.Location).HasColumnType($"geometry(point,{Constants.Wgs84SpatialReferenceId})"); e.HasIndex(x => x.Location).HasMethod("gist"); e.ToTable("Place"); }); b.Entity(); base.OnModelCreating(b); } }