I tried test below several times and got output

5000 iterations, 77 exceptions
5000 iterations, 57 exceptions
5000 iterations, 46 exceptions
5000 iterations, 115 exceptions
5000 iterations, 68 exceptions
5000 iterations, 78 exceptions


Maybe only way to use DbLinq in mono trunk is to run every DbLinq query in a 
loop and ignore those exceptions.

Andrus.

public static class AppMainEntry

{

class TestEntity

{

public int contents { get; set; }

}

[STAThread]

public static void Main()

{

int i = 0, exceptions = 0;

for (; i < 5000; i++)

{

using (var db = new Entity(new Npgsql.NpgsqlConnection(

"host=localhost;DATABASE=test;USER=test;PASSWORD=xxxxx;SSLMODE=Prefer;SSL=True"),

new DbLinq.PostgreSql.PgsqlVendor()))

try

{

db.ExecuteQuery<TestEntity>("SELECT 1 as contents").ToList();

}

catch (Exception ex)

{

exceptions++;

}

}

Console.WriteLine(i.ToString() + " iterations, " + exceptions.ToString() + " 
exceptions");

}

I replaced DynamicInvoke call in QueryRunner.cs:EnumerateResult with a call to 

namespace DbLinq

{

public static class MonoFix

{

public static object DynamicInvoke(Delegate deleg, params object[] args)

{

for (int i=0; i<3; i++)

try

{

return deleg.DynamicInvoke(args);

}

catch (Exception) { }

return deleg.DynamicInvoke(args);

}

}

}



buth this does not decrease number of exceptions.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to