Another edits of storages.
This commit is contained in:
parent
206c85f876
commit
c006506586
@ -20,6 +20,7 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
using var context = new BankYouBancruptDatabase();
|
||||
|
||||
return context.Creditings
|
||||
.Include(x => x.Card)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -34,7 +35,7 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
using var context = new BankYouBancruptDatabase();
|
||||
|
||||
return context.Creditings
|
||||
.Where(x => x.CardId == model.CardId)
|
||||
.Include(x => x.Card)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -49,8 +50,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
using var context = new BankYouBancruptDatabase();
|
||||
|
||||
return context.Creditings
|
||||
.FirstOrDefault(x => (!(model.CardId < 0) && x.CardId == model.CardId) ||
|
||||
(model.Id.HasValue && x.Id == model.Id))
|
||||
.Include(x => x.Card)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,9 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
using var context = new BankYouBancruptDatabase();
|
||||
|
||||
return context.MoneyTransfers
|
||||
.Include(x => x.AccountPayeer)
|
||||
.Include(x => x.AccountSender)
|
||||
.Include(x => x.Cashier)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -33,6 +36,9 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
using var context = new BankYouBancruptDatabase();
|
||||
|
||||
return context.MoneyTransfers
|
||||
.Include(x => x.AccountPayeer)
|
||||
.Include(x => x.AccountSender)
|
||||
.Include(x => x.Cashier)
|
||||
.Where(x => x.AccountSenderId == model.AccountSenderId)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -48,9 +54,10 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
using var context = new BankYouBancruptDatabase();
|
||||
|
||||
return context.MoneyTransfers
|
||||
.FirstOrDefault(x => (!(model.AccountSenderId < 0) && x.AccountSenderId == model.AccountSenderId
|
||||
&& x.AccountPayeeId == model.AccountPayeeId && x.DateOperation == x.DateOperation
|
||||
&& x.Sum == model.Sum) || (model.Id.HasValue && x.Id == model.Id))
|
||||
.Include(x => x.AccountPayeer)
|
||||
.Include(x => x.AccountSender)
|
||||
.Include(x => x.Cashier)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user