I'm refactoring a code and I have this question.
public class MovimentoManualListRepository : RepositoryBase<MovimentoManualList>, IMovimentoManualListRepository
{
ConsultarContext _context;
public MovimentoManualListRepository(ConsultarContext context) : base(context)
{
_context = context;
}
public List<MovimentoManualList> Listar()
{
return _context.Database
.SqlQuery<MovimentoManualList>("ListarMovimentacao")
.ToList();
}
}
I get an error:
Severity Code Description Project File Line Suppression State Error CS1061 'DatabaseFacade' does not contain a definition for 'SqlQuery' and no accessible extension method 'SqlQuery' accepting a first argument of type 'DatabaseFacade' could be found (are you missing a using directive or an assembly reference?)