开发者

Entity Framework Foreign Key Association

How do I set up a case-insensitive association in Entity Framework between 2 tables where it exists a Foreign Key constraint and the column based on the relation is a string/nvarchar(50)?

The collation for the database and columns is SQL_Latin1_General_CP1_CI_AS.

The tables look like this:

Table A:

Id (Primary Key) int
IdB (Foreign Key) nvarchar(50)

Table B:

Id (Primary Key) nvarchar(50)

I am running Sql server 2008, EF 4.0, .NET 4. Unfortunately, I can't change the database schema due to a legacy system using th开发者_StackOverflow社区e same tables.

Thanks in advance!


Unfortunately, there is no way to do this:

http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/af3359a9-99bb-4e02-94dd-5b9a6a9cf0db

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜