-
Номер счета:
+
Номер карты:
diff --git a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs
index 4bea9a8..bdca9f7 100644
--- a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs
+++ b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CardStorage.cs
@@ -38,6 +38,7 @@ namespace BankYouBankruptDatabaseImplement.Implements
return context.Cards
.Include(x => x.Client)
+ .Include(x => x.Account)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.Number) && x.Number == model.Number) ||
(model.Id.HasValue && x.Id == model.Id))
?.GetViewModel;
@@ -51,7 +52,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
{
return context.Cards
.Include(x => x.Client)
- .Where(x => x.Number.Contains(model.Number))
+ .Include(x => x.Account)
+ .Where(x => x.Number.Contains(model.Number))
.Select(x => x.GetViewModel)
.ToList();
}
@@ -60,7 +62,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
{
return context.Cards
.Include(x => x.Client)
- .Where(x => x.ClientID == model.ClientID)
+ .Include(x => x.Account)
+ .Where(x => x.ClientID == model.ClientID)
.Select(x => x.GetViewModel)
.ToList();
}
@@ -69,14 +72,16 @@ namespace BankYouBankruptDatabaseImplement.Implements
{
return context.Cards
.Include(x => x.Client)
- .Where(x => x.AccountId == model.AccountId)
+ .Include(x => x.Account)
+ .Where(x => x.AccountId == model.AccountId)
.Select(x => x.GetViewModel)
.ToList();
}
return context.Cards
.Include(x => x.Client)
- .Select(x => x.GetViewModel)
+ .Include(x => x.Account)
+ .Select(x => x.GetViewModel)
.ToList();
}
@@ -86,7 +91,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
return context.Cards
.Include(x => x.Client)
- .Select(x => x.GetViewModel)
+ .Include(x => x.Account)
+ .Select(x => x.GetViewModel)
.ToList();
}