Here are the examples of the csharp api class System.Data.Common.DbDataRecord.GetValue(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[Test] public void StringToInt8() { this.Add("100"); var q = this.ObjectContext.CreateQuery<DbDataRecord>( "SELECT cast(x.Value as System.Byte) FROM StringFieldEntities as x"); var value = q.FirstOrDefault().GetValue(0); value.Should().Be((byte)100); }
0
2. Example
View license[Test] public void CastStringToInt8() { this.Add("100"); var q = this.ObjectContext.CreateQuery<DbDataRecord>( "SELECT cast(x.Value as System.Byte) FROM StringFieldEntities as x"); var value = q.FirstOrDefault().GetValue(0); value.Should().Be((byte)100); }