is it safe to use entity framework versus adonet for multi table joins?

Yes. EF enables you to express the query logic using LINQ queries over your entities, and will translate to SQL. It’s a core function of EF, and it’s very common to see it used in a Web API to fetch Entities from the database, and then serialize the Entities as JSON for sending to the client.

Using EF’s built-in database-to-Entity mapping and .NET’s built-in Entity-to-JSON mapping makes writing a Web API very simple.

Of course you should monitor the SQL generated by EF, and there are scenarios where you might drop down to Raw SQL Queries, Dapper, or ADO.NET. But for the basic use case of building a simple Web API, EF Core + ASP.NET Core is the simplest answer.

See eg Tutorial: Create a web API with ASP.NET Core

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top