Ошибки

This commit is contained in:
Polina 2024-04-29 21:12:32 +04:00
parent 1eaa05de77
commit ba41f219b7

View File

@ -15,7 +15,7 @@ namespace UniversityDatabaseImplement.Models
public DateOnly DatePurchase { get; private set; }
private Dictionary<int, ClassByPurchaseModel>? _cachedClasses;
[NotMapped]
public Dictionary<int, ClassByPurchaseModel> ClassModel => _cachedClasses ??= Class.Select(x => (ClassByPurchaseModel)x).ToDictionary(x => x.ClassId, x => x);
public Dictionary<int, ClassByPurchaseModel> ClassModel => _cachedClasses ??=Operations.Select(x => (ClassByPurchaseModel)x).ToDictionary(x => x.ClassId, x => x);
[NotMapped]
public List<CostByPurchaseModel>? CostsModel => null;
public int Id { get; private set; }