1
I am trying to implement a data solution that displays first the values that have the parameter passed to then pass the other parameters.
Example:
In a product table has the following data:
Coca-Cola -> Coca Cola Company
Pepsi -> Pepsico
Toddy -> Pepsico
Dolly -> Dolly
Itubaina -> Schin
When I pass the parameter the manufacturer "Pepsico" in the Entity Framework it should display the values in the following order:
Pepsi -> Pepsico
Toddy -> Pepsico
Coca-Cola -> Coca Cola Company
Dolly -> Dolly
Itubaina -> Schin
How can I do this?
What have you ever tried to do?
– Marco Souza
Perform two searches, one to take the data of the parameter and the other for the other data, but wanted something more efficient
– Gustavo Correia
Yeah, but like this?
– Marco Souza
var lista = Products.Where(x=> x.Manufacturer == "Pepsico"). toList(); var listSemParametros = Products.Where(x=> x.Manufacturer != "Pepsico"). toList(); after this I join the two lists
– Gustavo Correia
@Gustave occurences, there are two types of ordination, by ancestry and descent. Why do you want to make this ordination ? By chance "Pepsico" is the best selling product ?
– Luã Govinda Mendes Souza
is just an example of parameter the user passes
– Gustavo Correia