2
I have a question on a filter using Linq, I have a critical object Inside criticism has a ienumerable I need to return a list of criticisms that the status of the last critical move equals 2 But the code below is giving error
var Criticas = from a in Db.Criticas select a;
Criticas = Criticas.Where(c => c.MovimentacoesCritica.LastOrDefault().Status.Equals(2));
read twenty times and did not understand its doubt! D
– Samuel Diogo
You said you were having a doubt, showed a little code and gave a basic explanation of what you’re trying to do. But in the end, you didn’t say what the doubt is after all!
– Victor Stafusa
Do you want to get the last record with the status equal to 2? It’s very confusing.
– Filipe Oliveira
You are very confused... You want to get the last item in the list when it has status equal to 2? or you want to get the last one in the list that is status 2?
– Julio Borges