Entity Framework Request Strange Behavior

No results were received below the query, even if there was a matching record in the database. enter image description here

  • Even the generated query will give a result when executed in the database.
  • In addition, the query produces results when "order by" is added to the query.
  • There are no changes in the request parameters.
  • The same query works for dev database, has no result in QA database.
  • There are no changes in the QA database compared to Dev.

enter image description here

+3


source to share


1 answer


I think you need to add a filter for ADMINGROUP



var currentDept = (from d in dbContext.TBLZLISTDEPTs
where d.ADMINGROUP != null
select new 
{
   d.ADMINGROUP
}).FirstOrDefault();

      

0


source







All Articles