Here are the examples of the csharp api class System.Data.Common.DbDataRecord.GetDouble(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
View license[Fact] public void MinWithPredicate() { MySqlCommand trueCmd = new MySqlCommand("SELECT MIN(Freight) FROM Orders WHERE shopId=2", st.conn); object freight = trueCmd.ExecuteScalar(); using (testEntities context = new testEntities()) { string eSql = "SELECT Min(o.Freight) FROM Orders AS o WHERE o.Shop.Id = 2"; ObjectQuery<DbDataRecord> q = context.CreateQuery<DbDataRecord>(eSql); string sql = q.ToTraceString(); st.CheckSql(sql, SQLSyntax.MinWithPredicate); foreach (DbDataRecord r in q) { Assert.Equal(Convert.ToDouble(freight), r.GetDouble(0)); } } }
0
2. Example
View license[Fact] public void MaxWithPredicate() { MySqlCommand trueCmd = new MySqlCommand("SELECT MAX(Freight) FROM Orders WHERE shopId=1", st.conn); object freight = trueCmd.ExecuteScalar(); using (testEntities context = new testEntities()) { string eSql = "SELECT MAX(o.Freight) FROM Orders AS o WHERE o.Shop.Id = 1"; ObjectQuery<DbDataRecord> q = context.CreateQuery<DbDataRecord>(eSql); string sql = q.ToTraceString(); st.CheckSql(sql, SQLSyntax.MaxWithPredicate); foreach (DbDataRecord r in q) Assert.Equal(Convert.ToDouble(freight), r.GetDouble(0)); } }