System.Data.Common.DbDataRecord.GetValue(int)

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 7

1. Example

Project: effort
Source File: EsqlCastFixture.cs
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);
        }

2. Example

Project: effort
Source File: StringParseFixture.cs
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);
        }