I have a SQL string (made by another programmer a long time ago so I can not change it) which returns something like this: If it has value in the column, it returns the value, otherwise it returns 0 (I would post the SQL here but it's gigantic.)
However, column with value is decimal, without value is integer. To pass it to C #, I created a model with dynamic property:
public dynamic valorRetornado { get; set; }
But it comes null. I tried with object and also did not funfou.
Does anyone have any ideas?
@HarryPotter here is:
//Data é a string aonde está o SQL
var dados = db.Database.SqlQuery<Produtos>(data);
foreach (var itens in dados)
{
listaProdutos.Add(customer);
}