The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Bart (2) [Avatar] Offline
It would be great if the design principles of the following frameworks become clear (and how they work together)
- EF Core
- Web API (REST)

In plain English, how to create automatically entities from an existing database, use them to create the REST API, which is used in a mobile or desktop application to view and update the data in the UI.

I found this ( but the rest of the pieces are not clear to me. Especially since this process is common, it should possible to automate this completely.
Andrew Lock (51) [Avatar] Offline
Thanks for posting.

Unfortunately, automating the entire process is not as simple as you might like, for the simple case that it's more complicated than your suggestion poses. For example, the outline you describe does not take security into account; automatically scaffolding EF entities from an existing database is not simple if the database doesn't follow the expected conventions; you should not directly exposes entities over a web API, and others.

Granted, there could probably be templates for doing a large part of this, and the necessary model mapping back and forth from view models to entities is a bit of a pain, but unfortunately that's all we have to work with at the moment!
Bart (2) [Avatar] Offline
Thanks for the response. Yes, I understand that it will not be perfect, but some kind of automation would be great if you could elaborate more in the book. There are great tools available: