IQueryable does not contain a definition for 'Include' and no extension method 'Include'

后端 未结 6 1888
离开以前
离开以前 2020-12-13 23:32

I\'m trying to use Include extension on IQueryable set, but I have the following issue:

Error 1 \'System.Linq.IQueryable<.Model.InsuranceCaseType

6条回答
  •  粉色の甜心
    2020-12-14 00:32

    If you deploy directly to your repository, you can use Include(), as per example code below:

    public IQueryable FindAll()
    {
         var retRepository = from colaborador in All()
                                .Include(x => x.Cliente)
                                select colaborador;
    
         return retRepository;
    }
    

提交回复
热议问题