Refactor and Fix PLZ/Ort in MemberListWindow

This commit is contained in:
2023-02-21 15:56:59 +01:00
parent a5d56a7c49
commit 71022c7fbf
14 changed files with 64 additions and 37 deletions

View File

@ -19,13 +19,13 @@ namespace WGneu.Models
public int Okz { get; set; }
[Column("country")]
public String CountryCode { get; }
public string CountryCode { get; }
[Column("id")]
public String Id { get; }
public string Id { get; }
[Column("dest")]
public String Dest { get; set; }
public string Dest { get; set; }
[ForeignKey("Okz")]
public virtual AT_Ort Ort { get; set; }
@ -33,9 +33,9 @@ namespace WGneu.Models
[ForeignKey("CountryCode")]
public virtual Country Country { get; set; }
public ISet<AT_Ort> Orte(WGContext ctx)
public ISet<AT_Plz> Orte(WgContext ctx)
{
return ctx.Postleitzahlen.Where(p => p.Plz == Plz).Select(p => p.Ort).ToHashSet();
return ctx.Postleitzahlen.Where(p => p.Plz == Plz).ToHashSet();
}
}
}