I am new to Entity Framework and ORM for this. In the project in which I am included, we have an outdated database, with all its keys as strings, case insensitive.
We convert to MSSQL and want to use EF as ORM, but we have encountered a problem.
Here is an example illustrating our problem:
Table A has a primary string key. Table B has a link to this primary key.
In LINQ we write something like:
var result = from t in context.TableB select t.TableA;
foreach( var r in result )
Console.WriteLine( r.someFieldInTableA );
if TableA contains the primary key that reads "A", and TableB contains two rows that refer to TableA, but with different cases in the link field: "a" and "A".
In our project, we want both lines to fall into the result, but only one with a suitable case will end there.
SQL Profiler, , .
Entity Framework, ?
:
NHibernate , NHibernate . , NHibernate .
, , Entity Framework.
!
, ,
- , .
, , EF.
, , .
,
edit: , , , , , , . .