I'm looking at designing some new software for work, and I have been using EF Core quite a bit in my personal projects.
In my mind, EF Core generates queries for the underlying data provider which returns data. These queries are ad-hoc, or the same as running a query on the MSSQL database through SSMS or equivalent.
I know with stored procedures we get stored execution plans so stored procedure's execute faster next time, as the plan doesn't need to get regenerated again. Therefore, for an enterprise system, EF Core would quite a bit slower for data operations than using, say, something like Dapper and Stored Procedures.
Do I have this completely wrong? Does EF Core on MSSQL somehow cache its execution plans and thus make the performance difference not as huge? Or do I have this entire thing back to front?