Created
June 1, 2017 06:46
-
-
Save forenheith/303ec6e0827f2b7f938e097a27e541b3 to your computer and use it in GitHub Desktop.
filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ticketsViewModelsCollection = | |
ticketsRepo.GetAll() | |
.Where( | |
m => | |
(m.TicketStateId == null || m.TicketStateId == model.StateId) | |
&& model.Direction == TicketDirection.In | |
? model.EmployeeId == null | |
? m.RecipientId == model.DepartmentId | |
: m.RecipientId == model.EmployeeId | |
: model.EmployeeId == null | |
? m.SenderId == model.DepartmentId | |
: m.SenderId == model.EmployeeId) | |
.Select(ModelsMapper.GetTicketViewModel) | |
.ToList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment