I have an table in my DB with four columns (priceId, price, orderId, projectId, customerId, categoryId). If i have the categoryId 1 and select all rows with that value.
From that result i want to select in this priority the first one, that has orderId, second that has projectId, third one that has customerId and last one that has empty(null) on customerid, porjectid and orderid.
The table is an price matrix that store prices for my categories and my project, order or customer can had unique prices.
Someone knows how i can do the query in mvc 5 C# with LINQ? Iam stuck on this.
Thanks!