Refactor and Fix PLZ/Ort in MemberListWindow
This commit is contained in:
@ -12,15 +12,15 @@ namespace WGneu.Models
|
||||
public class PostalDest
|
||||
{
|
||||
[Column("country")]
|
||||
public String CountryCode { get; set; }
|
||||
public string CountryCode { get; set; }
|
||||
|
||||
[Column("id")]
|
||||
public String Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
[ForeignKey("CountryCode")]
|
||||
public virtual Country Country { get; set; }
|
||||
|
||||
public AT_Plz? Plz(WGContext ctx)
|
||||
public AT_Plz? Plz(WgContext ctx)
|
||||
{
|
||||
if (CountryCode != "AT") return null;
|
||||
return ctx.Postleitzahlen.Where(p => p.Id == Id).FirstOrDefault();
|
||||
|
Reference in New Issue
Block a user