The function evaluation requires all threads to run

asp.net asp.net-mvc asp.net-mvc-5 c# entity-framework

Question

I have an ASP.Net MVC 5 application, I want to run a raw query with Entityframe work

when I run my code I get bellow error:

The function evaluation requires all threads to run

my code:

         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();
            }
        }
1
1
7/12/2016 12:48:39 PM

Popular Answer

0
7/12/2016 11:25:20 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow