Hello I now use the following SQL Query:
SELECT DateTime, CAST(FillLevel as REAL) as FillLevel, " +
"CAST(Temperature as REAL) as Temperature, " +
"CAST(Latitude as REAL) as Latitude, " +
"CAST(Longitude as REAL) as Longitude, " +
"CAST(Unit as REAL) as Unit from Message
Now I want to get the same result with a Linq query. What's the best way to CAST a type to REAL?
I now have the following:
var tempquery = from m in context.Message
where m.Unit == 1
select new
{
DateTime = m.DateTime,
FillLevel = m.FillLevel,
Temperature = m.Temperature,
Latitude = m.Latitude,
Longitude = m.Longitude,
Unit = m.Unit
};