Update models because contracts were removed

This commit is contained in:
2023-05-01 22:17:50 +02:00
parent 54aaf9fda0
commit c8f0537976
9 changed files with 77 additions and 103 deletions

View File

@ -162,10 +162,10 @@ namespace Elwig.Models {
public virtual Branch? Branch { get; private set; }
[InverseProperty("Member")]
public virtual ISet<Contract> Contracts { get; private set; }
public virtual ISet<AreaCom> AreaCommitments { get; private set; }
[NotMapped]
public virtual IEnumerable<Contract> ActiveContracts => Contracts
public virtual IEnumerable<AreaCom> ActiveAreaCommitments => AreaCommitments
.Where(c => c.YearFrom <= Utils.CurrentSeason && (c.YearTo ?? int.MaxValue) >= Utils.CurrentSeason);
[InverseProperty("Member")]