I have taken over the maintenance and development of a mature .NET Framework ASP.NET MVC application which uses an Entity Framework repository pattern. Several developers have worked on it before me and there are various styles. Database access is predominently accomplished though a mixture of EF LINQ and raw SQL. Most of the SQL is in stored procedures but there are lots of views. There is some raw SQL in the repositories.
I intend to do as much new development in .NET Core as I can, which I intend put in a Web API. I'm uncertain about whether to use Entity Framework or not. It was my intention to do so and I have invested a lot of my own time in learning EF Core, predominently from the book "Entity Framework Core in Action" by JP Smith, but also from web sources. It feels like the "right" approach is to use EF Core. MS pushes this. Lots of job adds list it in the required skills.
I think all the learning materials I have come across, including the book, cover very simple data models. For example, books, authors, reviews, orders, order lines. Even for these simple data models, writing a query in SQL seems easier to me than writing it in EF. Often when explaining what an EF query is doing the author will show the (horrid) generated SQL. Surely, if we need to worry about tweaking the EF code to improve the SQL we might as well just write the SQL? The data model I am dealing with is in another league from the those discussed in the EF learning materials I have come across. I have trouble enough understanding the SQL sometimes without trying to write such queries in EF. Maybe EF is OK with simple queries but we need to use raw SQL when it gets hard?
Often times, to get the data needed for a web page, several queries are needed with the output of one being the input of another. EF doesn't seem ideal for this.
I'm not stupid, neither am I a genius. I'm a standard developer, willing to spend some of my own time learing new skills, but I think to master EF Core I'd need to invest a huge amount more time. Why bother with EF at all I'm starting to think. Are any other ORMs better? Should I just use Dapper? It seems to be a vast edifice to generate SQL that may not be as good as I can write.