-1
I get the following error when executing the query:
"Cannot create a DbSet for 'Cliente_dto' because this type is not included in the model for the context."
public IQueryable<TEntity> CommandSql (string commandSql)
{
return dataBase.Set<TEntity>().FromSql(commandSql);
}
Cliente_dto
is not a class configured for such an operation, so which class determinesCliente
(I believe that’s the one)?– novic
Yes, I have the customer class. But with the Customer class_dto needed to return data that is not present in the customer class.
– Max Naegele
There is not much logic to it, you need to create a minimal example for people to know well what only this code says nothing...
– novic
For example, join with another table and return data from tabs to tables.
– Max Naegele
dataBase.Set<TEntity>().FromSql(commandSql);
when you do so withSet<>
you are asking the code that type, as the type does not exist if you can not use it there ...– novic