I am making a query to validate if there is a record in the database, for this I used the following
I declare variable
decimal serie= 10002;//este valor corresponde a un ejemplo, la variable puede tomar cualquier valor
I make the query
string sql2 = "SELECT codigo from tabla2 WHERE codigo=@serie";
My intention is to capture that value of the code field in the following variable
var camp = db.Database.SqlQuery<decimal>(sql2);
try it that way, that I have to modify so that I can capture that value in that variable