I want to launch a query crossing two tables that are related from many to many and in entity framework core 5, it is not necessary to create the c# class of the intermediate table. So with include I launch the query with left join which is correct, but I need to launch an inner join and I can't because I don't have the c# class of the intermediate table. How would it be possible to do this without having to create the c# class of the intermediate table?
thank you very much
You don't need intermediate entity in order to achieve inner join in a LINQ to Entities query. All you need is
SelectManywithoutDefaultIfEmpty().For instance, using the sample model from Many-to-many section of the documentation:
the following will generate inner join:
or with method syntax