繁体   English   中英

功能评估需要运行所有线程

[英]The function evaluation requires all threads to run

我有一个ASP.Net MVC 5应用程序,我想用Entityframe work运行原始查询

当我运行我的代码时,我得到了以下错误:

功能评估需要运行所有线程

我的代码:

         using (var context = new MyDbContext())
        {
            //var blogs = context.MySupportContext.SqlQuery("SELECT * FROM dbo.Supports").ToList();
            string myQuery = "Select id, FullName, sum(mins) as Mins from (Select t.id, FullName, NumberOfSupports* st.Minutes as mins from(Select st.Id, st.FullName, count(s.Id) as NumberOfSupports, s.SupportTypeId from SupportTeams stINNER JOIN Supports s on s.ResponsibleId = st.Idgroup by st.id, st.FullName, s.SupportTypeId) t inner join SupportTypes st on st.id = t.SupportTypeId) t group by id, FullName ";


            var blogs = context.Database.SqlQuery<string>(myQuery);


            string qString= string.Empty;

            if (blogs != null)
            {
                qString= blogs.ToString();
            }
        }

你应该看看这个: https//blogs.msdn.microsoft.com/eliofek/2012/12/12/why-do-we-get-the-function-evaluation-requires-all-threads-to-run/

我无法评论所以我们在这里作为答案

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM