I'm using dotConnect for Oracle 7.7.267 in my project.
I have noticed that my application doesn't work properly and I'm almost sure that there is a bug whith LinqConnect in Where clauses.
I have verified it with two selects:
The first one:
Code: Select all
//0
var dt = new DataTable();
dt.Columns.AddRange(new[]
{
new DataColumn("CODIGO",typeof(Int32)),
new DataColumn("NOMBRE",typeof(string))
});
dt.PrimaryKey = new[] {dt.Columns["CODIGO"]};
//1
var subt = CurrentIdiomaTable.Where(c => c.LANCHP_0 == capitulo);
//2
var spanishSubT = SpanishIdiomaTable.Where(c => c.LANCHP_0 == capitulo);
//3
spanishSubT = spanishSubT.Where(c => !subt.Select(d => d.LANNUM_0).Contains(c.LANNUM_0));
//4
foreach (var table in subt)
{
var dr = dt.NewRow();
dr["CODIGO"] = table.LANNUM_0;
dr["NOMBRE"] = table.LANMES_0;
dt.Rows.Add(dr);
}
foreach (var table in spanishSubT)
{
var dr = dt.NewRow();
dr["CODIGO"] = table.LANNUM_0;
dr["NOMBRE"] = table.LANMES_0;
dt.Rows.Add(dr);
}
Code: Select all
var clis = Context.BPDLVCUSTs.Where(c => c.BPCNUM_0 == codCliente).ToArray();
In the second example it occours the same. But I have more info in this case:
I'm executing step by step my app and when I execute the line posted, sometimes I get one register and sometimes I don't get any registers when I should obtain one.
When it occours, I verify that in context I have a total of 2005 registers (with sqldeveloper I check number of registers in the table and it is correct). So the problem is in where clause, becouse the register I'm looking for is in the context.
If I do the same select in sqldeveloper I obtain the register I'm looking for.
And with LinqConnect it's aleatory. Sometimes I obtain the register and sometimes 0 registers.
Do you have idea where is the problem?
Thank you and sorry for my english.