[#43] MemberAdminWindow: Do not use Context from ContextWindow any more
This commit is contained in:
@ -156,9 +156,10 @@ namespace Elwig.Models.Entities {
|
||||
[InverseProperty("Member")]
|
||||
public virtual ISet<AreaCom> AreaCommitments { get; private set; } = null!;
|
||||
|
||||
[NotMapped]
|
||||
public IEnumerable<AreaCom> ActiveAreaCommitments => AreaCommitments
|
||||
.Where(c => c.YearFrom <= Utils.CurrentYear && (c.YearTo ?? int.MaxValue) >= Utils.CurrentYear);
|
||||
public IEnumerable<AreaCom> ActiveAreaCommitments(AppDbContext ctx) {
|
||||
return ctx.AreaCommitments
|
||||
.Where(c => c.MgNr == MgNr && c.YearFrom <= Utils.CurrentYear && (c.YearTo ?? int.MaxValue) >= Utils.CurrentYear);
|
||||
}
|
||||
|
||||
[InverseProperty("Member")]
|
||||
public virtual BillingAddr? BillingAddress { get; private set; }
|
||||
|
Reference in New Issue
Block a user