Change code formatting

This commit is contained in:
2023-02-27 15:33:30 +01:00
parent 70b63e3dd4
commit 5480e4f9b9
17 changed files with 148 additions and 300 deletions

View File

@ -6,11 +6,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WGneu.Models
{
namespace WGneu.Models {
[Table("postal_dest"), PrimaryKey("CountryCode", "Id")]
public class PostalDest
{
public class PostalDest {
[Column("country")]
public string CountryCode { get; set; }
@ -20,8 +18,7 @@ namespace WGneu.Models
[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();
}