Bug 24935 - Dynamic property is case sensitive
Summary: Dynamic property is case sensitive
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data (show other bugs)
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2014-11-29 13:57 UTC by eetasoft
Modified: 2015-01-13 05:24 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:


Description eetasoft 2014-11-29 13:57:12 UTC
dynamic property returned by webmatrix from npgsql is case sensitive.

Steps to reproduce:

1. Create ASP.NET MVC 4 application using Microsoft Webmatrix.Data.dll and Npgsql with controller:

        public ActionResult CaseTest()
            using (var db = Database.OpenConnectionString(ConnectionString(),
                var vaik = db.QuerySingle("select 'Test' as Test");
                return new ContentResult() { Content = vaik.Test };

        static string ConnectionString()
            NpgsqlConnectionStringBuilder csb = new NpgsqlConnectionStringBuilder()
                SearchPath = "public",
                Host = "localhost",
                Database = "postgres",
                UserName = "postgres",
            return csb.ConnectionString;

2. Invoke controller CaseTest method in linux


[System.IndexOutOfRangeException]: Array index is out of range.
at System.Data.Common.DbDataRecordImpl.GetValue (int) <0x0005f>
at System.Data.Common.DbDataRecordImpl.get_Item (int) <0x00018>
at System.Data.Common.DbDataRecordImpl.get_Item (string) <0x00027>
at WebMatrix.Data.DynamicRecord.get_Item (string) <0x00030>
at WebMatrix.Data.DynamicRecord.TryGetMember (System.Dynamic.GetMemberBinder,object&) <0x0002b>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object) <0x000e9>
at My.Controllers.ReportController.CaseTest () <0x001d3>
at (wrapper dynamic-method) object.lambda_method (System.Runtime.CompilerServices.Closure,System.Web.Mvc.ControllerBase,object[]) <0x00045>
at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc.ControllerBase,object[]) <0x0002d>
at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc.ControllerContext,System.Collections.Generic.IDictionary`2<string, object>) <0x001ff>
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc.ControllerContext,System.Web.Mvc.ActionDescriptor,System.Collections.Generic.IDictionary`2<string, object>) <0x00033>
at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeSynchronousActionMethod (System.Web.Mvc.ControllerContext,System.Web.Mvc.ActionDescriptor,System.Collections.Generic.IDictionary`2<string, object>) <0x00023>
at System.Web.Mvc.Async.AsyncControllerActionInvoker/<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41 () <0x0001f>
at System.Web.Mvc.Async.AsyncResultWrapper/<>c__DisplayClass8`1<System.Web.Mvc.ActionResult>.<BeginSynchronous>b__7 (System.IAsyncResult) <0x00019>
at System.Web.Mvc.Async.AsyncResultWrapper/WrappedAsyncResult`1<System.Web.Mvc.ActionResult>.End () <0x0005a>
at System.Web.Mvc.Async.AsyncResultWrapper.End<System.Web.Mvc.ActionResult> (System.IAsyncResult,object) <0x0003b>
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (System.IAsyncResult) <0x00027>
at System.Web.Mvc.Async.AsyncControllerActionInvoker/<>c__DisplayClass37/<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33 () <0x0007e>
at System.Web.Mvc.Async.AsyncControllerActionInvoker/<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49 () <0x00038>


controller shoudl return Test

In .NET 4 in Windows it produces expected result.
Comment 1 eetasoft 2014-12-01 13:54:23 UTC
Also entered in https://github.com/npgsql/npgsql/issues/421
Comment 2 Marek Safar 2015-01-13 05:24:48 UTC
It should be fixed in master

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Create a new report for Bug 24935 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Related Links: