I need to make a comparison to set the value within my select new
. I'll try to explain better.
var tipo= from t in p
select new
{
t.Key,
t.Value,
};
return Ok(tipo);
I wanted to buy if t.key == "blue" if it were, it would only set this value. If it were something else, it would set the value. I tried to create an if () inside linq, but the language does not allow it. Does anyone have any idea how I can buy?
The amount I want to buy is with an Enummeration.