Page 1 of 1

LinqConnect and DevExpress ASP.NET MVC extensions

Posted: Wed 23 Nov 2011 19:03
by yozey
Hi, I am using dotConnect for PostgreSQL to create some models from my database through LinqConnect. The models are to be fed to an ASP.NET MVC GridView from DevExpress. When I call their BindToLinq method it returns a
Key expression is undefined exception
. What is strange about this is that the same GridView connected to a database of similar structure however connected to SQL Server, I do not get this exception. This leads me to believe the issue may lie with dotConnect.

Basically why would this work for native entities but those created with LinqConnect do not?

Posted: Wed 23 Nov 2011 20:55
by yozey
Ok, I found out that no matter the entity, if it has more than one primary key (eg. a composite key) then this will arise. Seems as if IsPrimary=true cannot be set for more than one property.

Posted: Fri 25 Nov 2011 16:01
by StanislavK
We have reproduced the problem with composite primary keys when using both LinqConnect and LINQ to SQL models. The stack trace of the exception includes DevExpress methods and the ones from the System assemblies only. Thus, the problem apparently originates from the grid component. Please address this request to the DevExpress support.

Feel free to contact us if you have any questions or encounter any problems when using LinqConnect or dotConnect for PostgreSQL.

Posted: Fri 25 Nov 2011 16:18
by yozey
Hi thanks for your reply. Yes we have found out it exists in their end and I think they are working on a fix.

Thanks