Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity-Framework -> MySql gives 'Function evaluation timed out.'

I having a weird problem with Entity Framework with MySql database.

Here's the code that I've got.

public class testbase
{
    private testEntities db = new testEntities();

    public IQueryable<post> GetRecords()
    {
        return db.record;
    }
}

Here record is a table in my database and this could should return all the rows in the table. I have only one row in there and when I do a db.record.Count(), I get 1.

But when I try to retrieve the rows themselves I get 'Function Evaluation timed out'.

What's happening? Anybody got any ideas?

like image 915
Cyril Gupta Avatar asked Apr 28 '26 05:04

Cyril Gupta


1 Answers

Okay, this turned out to be a dud question. Ben M was right. Some googling revealed: -

  1. EF does not behave well while debugging due to some issues in VS debugger. You get a 'Function evaluation timed out'.
  2. Things work swell when you try the code without debugging.

I was testing as I go for my new EF+MySql+ASP.Net.MVC app, and since I am a n00b at all three I didn't realize that.

I haven't deleted the question yet because there for others like me. It's on the community to decide whether to let this question survive or go.

I pronounce this question officially a dud.

like image 102
Cyril Gupta Avatar answered Apr 29 '26 22:04

Cyril Gupta