2
I’m developing a system in ASP.NET MVC which uses as standard the Entity Framework for data access, but I am in need of a select on another select, and I don’t know how to do this with Entity. The code SQL which I would like to use is the following:
select * from pedidos as p
inner join agendamentos as a
on a.pedidoID = p.pedidoID
where a.data = (select max(data) from (select a.data from pedidos as p
inner join agendamentos as a
on a.pedidoID = p.pedidoID
where a.realizado = 0) as dataagendamentos);
If anyone can help me, I’d be grateful!
Could put the entities?
– Lucas Kauer
Could you explain the purpose of this consultation? It will facilitate the solution of your problem (because there may be other better ways to solve it).
– Lucas Kauer
The query is necessary to list all requests along with the last scheduled by the same.
– João Pedro
@Lucaskauer would be a simple & #Xa;Orders 1->n Schedules
– João Pedro