'Iorderedequeryable<Condominium>' does not contain a Definition for 'Tolistasync'

Asked

Viewed 123 times

0

I’m getting the following error:

as in the image below: inserir a descrição da imagem aqui

In that part of the Code:

public async Task<IEnumerable<Condominium>> FindCondominiumAllAsync()
{
    return await FindAll()
            .OrderBy(c => c.Name)
            .ToListAsync();
}

'Iorderedqueryable' does not contain a Definition for 'Tolistasync' and no accessible Extension method 'Tolistasync' Accepting a first argument of type 'Iorderedqueryable'

You could help me where I’m going wrong ?

Return of the Findall:

 IQueryable<TEntity> FindAll();

Att.

Matheus.

  • what returns the FindAll()?

  • I put in question @Leandroangelo

1 answer

0

Install the EntityFramework.

The ToListAsync is an extension method defined in classe System.Data.Entity.QueryableExtensions

You’re probably not importing the namespace ...

for example using System.Data.Entity;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.