Entity Framework is slow because of derived tables

后端 未结 1 893
醉梦人生
醉梦人生 2021-02-06 02:29

I am using MySQL Connector/Net 6.5.4 with LINQ to entities, and I frequently get terrible query performance because the entity framework generates queries that use derived table

相关标签:
1条回答
  • 2021-02-06 02:35

    I think your query statement is missing 'select'. You have not identified the record(s) you want. your query:

    var culverCustomers = from cs in db.CustomerSummaries 
                            where cs.Street == "Culver";
    

    //no select

    what are you selecting from the table? try this

    example:

    var culverCustomers =  from cs in db.CustomerSummaries 
                            where cs.Street == "Culver"
                            select cs;
    
    0 讨论(0)
提交回复
热议问题