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