public void Round()
{
using (testEntities context = new testEntities())
{
ObjectQuery<DbDataRecord> q = context.CreateQuery<DbDataRecord>(@"
SELECT o.Id, o.Freight,
Round(o.Freight) AS [Rounded Freight],
Floor(o.Freight) AS [Floor of Freight],
Ceiling(o.Freight) AS [Ceiling of Freight]
FROM Orders AS o WHERE o.Id=1");
foreach (DbDataRecord r in q)
{
Assert.AreEqual(1, r[0]);
Assert.AreEqual(65.3, r[1]);
Assert.AreEqual(65, r[2]);
Assert.AreEqual(65, r[3]);
Assert.AreEqual(66, r[4]);
}
}
}